[pacman-dev] [PATCH 4/3] makepkg: fix a GNU-ism in awk usage
Rémy Oudompheng
remyoudompheng at gmail.com
Sat Apr 2 06:31:19 EDT 2011
A non-GNU version of awk may not support the (|...) syntax for
an optional group and require '()' to match an empty string.
The (...)? syntax is more appropriate for this usage.
Signed-off-by: Rémy Oudompheng <remy at archlinux.org>
---
Problem arises when trying to use makepkg with FreeBSD's awk.
scripts/makepkg.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 193a185..6d78887 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1275,7 +1275,7 @@ check_sanity() {
done
local optdepends_list=()
- eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(|#.*)$/' "$BUILDFILE" | \
+ eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//")
for i in "${optdepends_list[@]}"; do
local pkg=${i%%:*}
--
1.7.4.2
More information about the pacman-dev
mailing list