[pacman-dev] [PATCH] makepkg: Add used options to PKGINFO file
Allan McRae
allan at archlinux.org
Thu Jul 24 08:38:02 EDT 2008
Adds defined options to the PKGINFO file in the form of "makepkgopt =".
It may be useful to be able to add these to the pacman DB at some point
as that would allow (e.g.) checking which packages have had their docs
striped (FS#7092).
Signed-off-by: Allan McRae <allan at archlinux.org>
---
scripts/makepkg.sh.in | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 379e9d8..5bed00e 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -823,6 +823,16 @@ create_package() {
for it in "${backup[@]}"; do
echo "backup = $it" >>.PKGINFO
done
+ for it in "${known_options[@]}"; do
+ local ret="$(check_option $it)"
+ if [ "$ret" != "?" ]; then
+ if [ "$ret" = "y" ]; then
+ echo "makepkgopt = $it" >>.PKGINFO
+ else
+ echo "makepkgopt = !$it" >>.PKGINFO
+ fi
+ fi
+ done
# TODO maybe remove this at some point
# warn if license array is not present or empty
--
1.5.6.4
More information about the pacman-dev
mailing list