From dc817a2061699cd1f33ca93f0d93a1fbc2f33ea1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 17 Jun 2010 14:32:08 +1000 Subject: makepkg: fallback to sane defaults for library stripping If the library stripping variables are not defined in makepkg.conf, libraries will be fully stripped and become broken. Fallback to a sane default stripping level. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d9867016..e64b5646 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -864,6 +864,9 @@ tidy_install() { if [[ $(check_option strip) = y && -n ${STRIP_DIRS[*]} ]]; then msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")" + # make sure library stripping variables are defined to prevent excess stripping + [[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-S" + [[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S" local binary find ${STRIP_DIRS[@]} -type f -perm -u+w 2>/dev/null | while read binary ; do case "$(file -bi "$binary")" in -- cgit v1.2.3-24-g4f1b From 7fc50d79508f30e74e5ea8d9c801549e7f52229d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 17 Jun 2010 00:01:23 -0500 Subject: Revert disabling of make in doc/ dir by default This is a partial revert of commit d44e5099. By making disabling docs the default, it presents all sorts of problems- namely anyone who builds from a tarball and isn't careful enough to include '--enable-doc' will get an install without any manpages at all. Remember that make includes both 'build' and 'install' steps. The warning introduced by the commit is kept, so we do not lose all its benefits, but I am not happy to see regressions introduced in packaging and installing of this piece of software. Signed-off-by: Dan McGee --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 008975b8..4faf20d9 100644 --- a/configure.ac +++ b/configure.ac @@ -100,8 +100,8 @@ AC_ARG_ENABLE(internal-download, # Help line for documentation AC_ARG_ENABLE(doc, - AS_HELP_STRING([--enable-doc], [run make in doc/ dir]), - [wantdoc=$enableval], [wantdoc=no]) + AS_HELP_STRING([--disable-doc], [prevent make from looking at doc/ dir]), + [wantdoc=$enableval], [wantdoc=yes]) # Help line for doxygen AC_ARG_ENABLE(doxygen, @@ -272,7 +272,7 @@ if test "x$wantdoc" = "xyes" ; then fi wantdoc=yes else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no, disabled by configure]) wantdoc=no fi AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes") -- cgit v1.2.3-24-g4f1b From 6c00ca8f234cfcbfde7e36b68d85f9dcab5716c8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 20 Jun 2010 15:15:05 -0500 Subject: Handle sync target + ignore properly Rather than say we can't find the target after saying "No, I guess I don't want to install this", we should make sure the ignored status gets passed all the way through. This fixes FS#19866. Pactest is also included that failed before due to the fact that we normally treat an unfound package as a reason to exit with a non-zero status. Signed-off-by: Dan McGee --- lib/libalpm/sync.c | 6 +++++- test/pacman/tests/ignore006.py | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/pacman/tests/ignore006.py diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 67afd397..68ee8dc7 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -291,7 +291,11 @@ int _alpm_sync_target(alpm_list_t *dbs_sync, char *target) } if(!found) { - RET_ERR(PM_ERR_PKG_NOT_FOUND, -1); + /* pass through any 'found but ignored' errors */ + if(pm_errno != PM_ERR_PKG_IGNORED) { + pm_errno = PM_ERR_PKG_NOT_FOUND; + } + return(-1); } return(0); diff --git a/test/pacman/tests/ignore006.py b/test/pacman/tests/ignore006.py new file mode 100644 index 00000000..4c1c1cac --- /dev/null +++ b/test/pacman/tests/ignore006.py @@ -0,0 +1,10 @@ +self.description = "Sync with target in ignore list and say no" + +pkg = pmpkg("package1") +self.addpkg2db("sync", pkg) + +self.option["IgnorePkg"] = ["package1"] +self.args = "--ask=1 -S %s" % pkg.name + +self.addrule("PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=package1") -- cgit v1.2.3-24-g4f1b From c2cf6a14cf44400d0ef249b38d37eb04d3424bf4 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 20 Jun 2010 23:26:47 +1000 Subject: makepkg: revert bash4-ism Commit 3d67d9b1 introduced multiple bash4 string manipulations. Revert those in order retain compatibility with bash-3.2 which is still widely used. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index e64b5646..4f9f89b1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -265,11 +265,11 @@ check_buildenv() { # ? - not found ## in_opt_array() { - local needle="${1,,}"; shift + local needle=$(tr '[:upper:]' '[:lower:]' <<< $1); shift local opt for opt in "$@"; do - opt="${opt,,}" + opt=$(tr '[:upper:]' '[:lower:]' <<< $opt) if [[ $opt = $needle ]]; then echo 'y' # Enabled return @@ -554,7 +554,7 @@ generate_checksums() { local integ for integ in ${integlist[@]}; do - integ="${integ,,}" + integ=$(tr '[:upper:]' '[:lower:]' <<< "$integ") case "$integ" in md5|sha1|sha256|sha384|sha512) : ;; *) @@ -617,7 +617,7 @@ check_checksums() { fi if (( $found )) ; then - local expectedsum="${integrity_sums[$idx],,}" + local expectedsum=$(tr '[:upper:]' '[:lower:]' <<< "${integrity_sums[$idx]}") local realsum="$(openssl dgst -${integ} "$file")" realsum="${realsum##* }" if [[ $expectedsum = $realsum ]]; then @@ -1669,7 +1669,7 @@ if (( CLEANCACHE )); then echo -n "$(gettext " Are you sure you wish to do this? ")" echo -n "$(gettext "[y/N]")" read answer - answer="${answer^^}" + answer=$(tr '[:lower:]' '[:upper:]' <<< "$answer") if [[ $answer = $(gettext YES) || $answer = $(gettext Y) ]]; then rm "$SRCDEST"/* if (( $? )); then -- cgit v1.2.3-24-g4f1b