From b373b1d16b6235bef2e34a9a21e043418222a813 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 4 Dec 2008 23:20:24 +1000 Subject: contrib/pactree: fix option parsing The option parsing was catching any "-d" in an argument so packages with this in their name did not work. Also removed commented code line that appears to be inserted during testing. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- contrib/pactree | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/pactree b/contrib/pactree index d9fa8b3b..df536717 100755 --- a/contrib/pactree +++ b/contrib/pactree @@ -208,11 +208,10 @@ for (( n=0 ; n < $len_options ; n++ )); do continue fi - if [[ "${options[$n]}" =~ -d[[:digit:]]* || "${options[$n]}" == "--depth" ]]; then + if [[ "${options[$n]}" =~ -d[[:digit:]]+ || "${options[$n]}" == "--depth" ]]; then if [[ "${options[$n]#-d}" =~ [[:digit:]]+ ]]; then max_depth="${options[$n]#-d}" elif [[ ${options[$((n+1))]} =~ [[:digit:]]+ ]]; then -# if [ ${options[$((n+1))]} -eq ${options[$((n+1))]} 2>/dev/null ]; then max_depth="${options[$((n+1))]}" unset options[$((n+1))] ((++n)) -- cgit v1.2.3-54-g00ecf From 59776ef306935399b2bf1e9cbdd7a7bfa6df1b49 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 4 Dec 2008 20:44:27 -0600 Subject: makepkg: save and restore shell options before and after build() Fix the issue uncovered by FS#12344. In this instance, the dotglob shopt was being set in the build() function but never cleared, causing issues in the remaining parts of the makepkg script. Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 4cc255cc..ef2ede1f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -675,6 +675,8 @@ run_build() { # ensure all necessary build variables are exported export CFLAGS CXXFLAGS MAKEFLAGS CHOST + # save our shell options so build() can't override what we need + local shellopts=$(shopt -p) local ret=0 if [ "$LOGGING" = "1" ]; then @@ -695,6 +697,8 @@ run_build() { else build 2>&1 || ret=$? fi + # reset our shell options + eval "$shellopts" if [ $ret -gt 0 ]; then error "$(gettext "Build Failed.")" -- cgit v1.2.3-54-g00ecf From 78cf32e194a1a58c6a7ee3d1c10623e668be71d6 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 7 Dec 2008 22:08:18 -0600 Subject: Small documentation updates for clarity Signed-off-by: Dan McGee --- doc/PKGBUILD.5.txt | 2 +- doc/repo-add.8.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 9db10576..22c56be3 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -90,7 +90,7 @@ similar to `$_basekernver`. + It is also possible to specify an optional filename, which is helpful with weird URLs and for handling multiple source files with the same -name. The syntax is: `source=('filename::url')` +name. The syntax is: `$$source=('filename::url')$$` *noextract (array)*:: An array of filenames corresponding to those from the source array. Files diff --git a/doc/repo-add.8.txt b/doc/repo-add.8.txt index d3b85762..b9956e9b 100644 --- a/doc/repo-add.8.txt +++ b/doc/repo-add.8.txt @@ -16,9 +16,9 @@ repo-add - package database maintenance utility Synopsis -------- -repo-add [-q] ... +repo-add [-q] [ ...] -repo-remove [-q] ... +repo-remove [-q] [ ...] Description -- cgit v1.2.3-54-g00ecf