[pacman-dev] [PATCHv4 2/3] makepkg: Reorder some entries in usage() and getopts
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> --- scripts/makepkg.sh.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 9d2b43f..6e634d9 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2534,7 +2534,6 @@ usage() { printf -- "$(gettext " -S, --source Generate a source-only tarball without downloaded sources")\n" printf -- "$(gettext " -V, --version Show version information and exit")\n" printf -- "$(gettext " --allsource Generate a source-only tarball including downloaded sources")\n" - printf -- "$(gettext " --verifysource Download source files (if needed) and perform integrity checks")\n" printf -- "$(gettext " --asroot Allow %s to run as root user")\n" "makepkg" printf -- "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" printf -- "$(gettext " --config <file> Use an alternate config file (instead of '%s')")\n" "$confdir/makepkg.conf" @@ -2549,12 +2548,13 @@ usage() { printf -- "$(gettext " --skipchecksums Do not verify checksums of the source files")\n" printf -- "$(gettext " --skipinteg Do not perform any verification checks on source files")\n" printf -- "$(gettext " --skippgpcheck Do not verify source files with PGP signatures")\n" + printf -- "$(gettext " --verifysource Download source files (if needed) and perform integrity checks")\n" echo printf -- "$(gettext "These options can be passed to %s:")\n" "pacman" echo printf -- "$(gettext " --asdeps Install packages as non-explicitly installed")\n" - printf -- "$(gettext " --noconfirm Do not ask for confirmation when resolving dependencies")\n" printf -- "$(gettext " --needed Do not reinstall the targets that are already up to date")\n" + printf -- "$(gettext " --noconfirm Do not ask for confirmation when resolving dependencies")\n" printf -- "$(gettext " --noprogressbar Do not show a progress bar when downloading files")\n" echo printf -- "$(gettext "If %s is not specified, %s will look for '%s'")\n" "-p" "makepkg" "$BUILDSCRIPT" @@ -2606,8 +2606,8 @@ while true; do case "$1" in # Pacman Options --asdeps) ASDEPS=1;; - --noconfirm) PACMAN_OPTS+=" --noconfirm" ;; --needed) NEEDED=1;; + --noconfirm) PACMAN_OPTS+=" --noconfirm" ;; --noprogressbar) PACMAN_OPTS+=" --noprogressbar" ;; # Makepkg Options @@ -2637,10 +2637,10 @@ while true; do --pkg) shift; IFS=, read -ra p <<<"$1"; PKGLIST+=("${p[@]}"); unset p ;; -r|--rmdeps) RMDEPS=1 ;; -R|--repackage) REPKG=1 ;; + --sign) SIGNPKG='y' ;; --skipchecksums) SKIPCHECKSUMS=1 ;; --skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --skippgpcheck) SKIPPGPCHECK=1;; - --sign) SIGNPKG='y' ;; -s|--syncdeps) DEP_BIN=1 ;; -S|--source) SOURCEONLY=1 ;; --verifysource) VERIFYSOURCE=1 ;; -- 1.9.0
Previously, install_package() return code was either used as exit code or ignored. This was rather confusing. The return code is now always ignored and a comment on install_package() has been added. Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> --- scripts/makepkg.sh.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 6e634d9..111f01a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2075,6 +2075,7 @@ create_srcpackage() { rm -rf "${srclinks}" } +# this function always returns 0 to make sure clean-up will still occur install_package() { (( ! INSTALL )) && return @@ -2410,7 +2411,7 @@ check_build_status() { if (( INSTALL )); then warning "$(gettext "A package has already been built, installing existing package...")" install_package - exit $? + exit 0 else error "$(gettext "A package has already been built. (use %s to overwrite)")" "-f" exit 1 @@ -2433,7 +2434,7 @@ check_build_status() { if (( INSTALL )); then warning "$(gettext "The package group has already been built, installing existing packages...")" install_package - exit $? + exit 0 else error "$(gettext "The package group has already been built. (use %s to overwrite)")" "-f" exit 1 @@ -3097,6 +3098,6 @@ msg "$(gettext "Finished making: %s")" "$pkgbase $fullver ($(date))" install_package -exit 0 #E_OK +exit 0 # vim: set noet: -- 1.9.0
participants (1)
-
Pierre Neidhardt