From 50de87e0e61e4cd5e80e58dcabc0f80b3e94d203 Mon Sep 17 00:00:00 2001 From: Jeffrey Tolar Date: Wed, 21 Jan 2015 19:45:14 -0600 Subject: Remove --asroot from makepkg's completions Signed-off-by: Jeffrey Tolar Signed-off-by: Allan McRae --- contrib/bash_completion.in | 8 ++++---- contrib/zsh_completion.in | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index 15e1daca..224b8f92 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -75,10 +75,10 @@ _makepkg() { COMPREPLY=() _get_comp_words_by_ref cur prev if [[ $cur = -* && ! $prev =~ ^-(-(config|help)$|\w*[Chp]) ]]; then - opts=('allsource asdeps asroot check clean config force geninteg help holdver ignorearch - install key log needed noarchive nobuild nocheck nocolor noconfirm nodeps noextract - noprepare noprogressbar nosign pkg repackage rmdeps sign skipchecksums skipinteg - skippgpcheck source syncdeps verifysource version' + opts=('allsource asdeps check clean config force geninteg help holdver ignorearch install + key log needed noarchive nobuild nocheck nocolor noconfirm nodeps noextract noprepare + noprogressbar nosign pkg repackage rmdeps sign skipchecksums skipinteg skippgpcheck + source syncdeps verifysource version' 'A L R S c d e f g h i m o p r s') _arch_ptr2comp opts fi diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index f2ff7c8a..09058001 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -586,7 +586,6 @@ _makepkg_longopts=( '--syncdeps[Install missing dependencies with pacman]' '--source[Generate a source-only tarball without downloading sources]' '--allsource[Generate a source-only tarball including downloaded source]' - '--asroot[Allow makepkg to run as root user]' '--check[Run check() function in the PKGBUILD]' '--config[Use an alternate config file instead of '@sysconfdir@/makepkg.conf']: :_files' '--holdver[Prevent automatic version bumping for development PKGBUILDs]' -- cgit v1.2.3-24-g4f1b From aa12a773b8d6ed41878081a69d7a1d089129abef Mon Sep 17 00:00:00 2001 From: Jeffrey Tolar Date: Wed, 21 Jan 2015 19:45:15 -0600 Subject: Add --noarchive to makepkg's zsh completion Signed-off-by: Jeffrey Tolar Signed-off-by: Allan McRae --- contrib/zsh_completion.in | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index 09058001..1cae1de0 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -590,6 +590,7 @@ _makepkg_longopts=( '--config[Use an alternate config file instead of '@sysconfdir@/makepkg.conf']: :_files' '--holdver[Prevent automatic version bumping for development PKGBUILDs]' '--key[Specify key to use for gpg signing instead of the default]: :_keys' + '--noarchive[Do not create the archive at the end of the build process]' '--nocheck[Do not run the check() function in the PKGBUILD]' '--noprepare[Do not run the prepare() function in the PKGBUILD]' '--nosign[Do not create a signature for the package]' -- cgit v1.2.3-24-g4f1b From 8391716b8ab0bb884545bf0e76ab288412f5796e Mon Sep 17 00:00:00 2001 From: Lukáš Jirkovský Date: Thu, 22 Jan 2015 20:52:39 +0100 Subject: makepkg: Set the working copy destination explicitly when cloning in extract_git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the issue where if the user explicitly set the name of the cloned source to eg. foo.git, the directory name in $SRCDEST would be foo.git as expected, but the clone in $srcdir would be stripped of the .git suffix. Signed-off-by: Lukáš Jirkovský Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index da68dc74..f30156a9 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -605,7 +605,7 @@ extract_git() { exit 1 fi cd_safe "$srcdir" - elif ! git clone "$dir"; then + elif ! git clone "$dir" "${dir##*/}"; then error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git" plain "$(gettext "Aborting...")" exit 1 -- cgit v1.2.3-24-g4f1b From 3b22183a4d39b410ae7be0b95be6a1cb4704a50c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 24 Jan 2015 15:56:23 +1000 Subject: contrib: remove fakeroot option from PKGBUILD.vim Signed-off-by: Allan McRae --- contrib/PKGBUILD.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim index 91570637..cf264f93 100644 --- a/contrib/PKGBUILD.vim +++ b/contrib/PKGBUILD.vim @@ -211,7 +211,7 @@ hi def link pbValidSha512sums Number " options syn keyword pb_k_options options contained -syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|purge\|upx\|fakeroot\|distcc\|color\|ccache\|check\|sign\|makeflags\|buildflags\)/ contained +syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|purge\|upx\|distcc\|color\|ccache\|check\|sign\|makeflags\|buildflags\)/ contained syn match pbOptionsNeg /\!/ contained syn match pbOptionsDeprec /no/ contained syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOptionsDeprec,pbIllegalOption -- cgit v1.2.3-24-g4f1b From 841e531c519228b68a447a61d703d21c5ff6d37f Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Mon, 26 Jan 2015 13:19:29 -0500 Subject: trans_commit: restore pm_errno after updating log If the call to alpm_logaction failed it would overwrite pm_errno, leading to error messages unrelated to the actual reason the transaction failed. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/trans.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 7cdb096f..e1caa5e3 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -192,13 +192,17 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data) if(trans->add == NULL) { if(_alpm_remove_packages(handle, 1) == -1) { /* pm_errno is set by _alpm_remove_packages() */ + alpm_errno_t save = handle->pm_errno; alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n"); + handle->pm_errno = save; return -1; } } else { if(_alpm_sync_commit(handle, data) == -1) { /* pm_errno is set by _alpm_sync_commit() */ + alpm_errno_t save = handle->pm_errno; alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction failed\n"); + handle->pm_errno = save; return -1; } } -- cgit v1.2.3-24-g4f1b From 10fc538c70bf84f64881403f964ff4d6651268b3 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 27 Jan 2015 11:10:45 +1000 Subject: makepkg: refix removing static libraries when shared uses absolute symlinks Commit 9e5e86aa was supposed to fix this. Instead I picked another [[ -f ]] statement in the same region and added the hardlink test to it instead, thus not fixing the bug. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f30156a9..4461d12f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1818,7 +1818,7 @@ tidy_install() { msg2 "$(gettext "Removing static library files...")" local l while read -rd '' l; do - if [[ -f "${l%.a}.so" ]]; then + if [[ -f "${l%.a}.so" || -h "${l%.a}.so" ]]; then rm "$l" fi done < <(find . ! -type d -name "*.a" -print0) @@ -1832,7 +1832,7 @@ tidy_install() { # check existence of backup files local file for file in "${backup[@]}"; do - if [[ ! -f $file && ! -h $file ]]; then + if [[ ! -f $file ]]; then warning "$(gettext "%s entry file not in package : %s")" "backup" "$file" fi done -- cgit v1.2.3-24-g4f1b