diff options
author | Ulrich Müller <ulm@gentoo.org> | 2010-11-09 18:31:44 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2010-11-09 18:31:44 +0000 |
commit | 658dcfabc89f89ad7884e906501491764c38d649 (patch) | |
tree | 7f3f1b0a93408798fd9c15892cac5dc2383928b1 | |
parent | Allow distribution under GPL-2 or later for all files. (diff) | |
download | emacs-tools-658dcfabc89f89ad7884e906501491764c38d649.tar.gz emacs-tools-658dcfabc89f89ad7884e906501491764c38d649.tar.bz2 emacs-tools-658dcfabc89f89ad7884e906501491764c38d649.zip |
Allow for additional options passed to the package manager, bug 344467.
svn path=/emacs-updater/; revision=1584
-rw-r--r-- | ChangeLog | 10 | ||||
-rwxr-xr-x | emacs-updater | 11 | ||||
-rw-r--r-- | emacs-updater.8 | 7 |
3 files changed, 23 insertions, 5 deletions
@@ -1,3 +1,13 @@ +2010-11-09 Ulrich Mueller <ulm@gentoo.org> + + * emacs-updater (pm_portage, pm_pkgcore): Don't specify options + that are not strictly necessary. Fixes bug 344467. + (PM_EXTRAOPTS): New variable, saves any additional options after + the -- separator, so that they can be passed to the package + manager later on. + (usage): Update. + * emacs-updater.8: Update. + 2010-01-04 Christian Faulhammer <fauli@gentoo.org> * emacs-updater (pm_portage): Add --keep-going option for user diff --git a/emacs-updater b/emacs-updater index f1d80b6..e63d1e6 100755 --- a/emacs-updater +++ b/emacs-updater @@ -16,6 +16,7 @@ ACTIONS="sitedir rebuild" # Default package manager PM_COMMAND=pm_auto +PM_EXTRAOPTS=( ) # Other default variable settings EXACT= @@ -56,6 +57,8 @@ usage() { X the whole command string must be quoted X -h, --help display this help and exit X --version output version information and exit + X + X -- OPTIONS Pass additional OPTIONS to package manager EOF exit ${1} } @@ -73,10 +76,10 @@ version() { # Wrapper for package manager commands have_portage() { type -P emerge >/dev/null; } -pm_portage() { emerge --oneshot --ask --verbose --keep-going "$@"; } +pm_portage() { emerge --oneshot "$@"; } have_pkgcore() { type -P pmerge >/dev/null; } -pm_pkgcore() { pmerge --oneshot --ask "$@"; } +pm_pkgcore() { pmerge --oneshot "$@"; } have_paludis() { type -P paludis >/dev/null; } pm_paludis() { paludis --install --preserve-world "$@"; } @@ -150,7 +153,7 @@ do shift 2 ;; --package-manager-command) PM_COMMAND=${2}; shift 2 ;; - --) shift; break ;; + --) shift; PM_EXTRAOPTS=( "$@" ); break ;; *) # this should not happen; getopt should return bad status echo "Invalid option '${1}' given!" @@ -311,7 +314,7 @@ case "${choice}" in exit 10 ;; esac -${PM_COMMAND} $(<"${PKGFILE}") +${PM_COMMAND} "${PM_EXTRAOPTS[@]}" $(<"${PKGFILE}") warning "If a package is being rebuilt over and over again," warning "please report it on http://bugs.gentoo.org/" diff --git a/emacs-updater.8 b/emacs-updater.8 index 55d6bdf..f368662 100644 --- a/emacs-updater.8 +++ b/emacs-updater.8 @@ -2,7 +2,7 @@ .\" Distributed under the terms of the GNU General Public License v2 or later .\" $Id$ .\" -.TH emacs-updater 8 "August 2009" "Gentoo Linux" +.TH emacs-updater 8 "November 2010" "Gentoo Linux" .SH NAME emacs-updater \- rebuild Emacs packages .SH SYNOPSIS @@ -71,6 +71,11 @@ Display help and exit. .TP .B --version Output version information and exit. +.TP +.BI -- " OPTIONS" +Pass additional +.I OPTIONS +to package manager. This must be last on the command line. .SH ENVIRONMENT .TP .B PACKAGE_MANAGER |