From c306b85f0fa53a0120c9285d76ee5d84ac52138d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20=E2=80=9CKwpolska=E2=80=9D=20Warrick?= Date: Wed, 21 May 2014 17:08:50 +0200 Subject: [PATCH] add -U option to copy .pkg to cache & install it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Chris “Kwpolska” Warrick --- pkgbuilder/main.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgbuilder/main.py b/pkgbuilder/main.py index e91191c..e6bb50f 100644 --- a/pkgbuilder/main.py +++ b/pkgbuilder/main.py @@ -64,6 +64,13 @@ def main(source='AUTO', quit=True): argopr.add_argument( '-u', '--sysupgrade', action='count', default=False, dest='upgrade', help=_('upgrade installed AUR packages')) + argopr.add_argument( + '--safeupgrade', action='store_true', default=False, + dest='safeupgrade', help=_('perform a failsafe upgrade of ' + 'PKGBUILDer')) + argopr.add_argument( + '-U', '--upgrade', action='store_true', default=False, dest='finst', + help=_('copy package files to pacman cache and install them')) argopt = parser.add_argument_group(_('options')) argopt.add_argument( @@ -95,10 +102,6 @@ def main(source='AUTO', quit=True): argopt.add_argument( '-S', '--sync', action='store_true', default=False, dest='pac', help=_('pacman-like mode')) - argopt.add_argument( - '--safeupgrade', action='store_true', default=False, - dest='safeupgrade', help=_('perform a failsafe upgrade of ' - 'PKGBUILDer')) argopt.add_argument( '-y', '--refresh', action='store_true', default=False, dest='pacupd', help=_('(dummy)')) @@ -182,6 +185,11 @@ def main(source='AUTO', quit=True): if quit: exit(0) + if args.finst: + pkgbuilder.build.install(pkgnames, [], False) + if quit: + exit(0) + if args.pac: DS.log.debug('-S passed, building in /tmp/.') uid = os.geteuid()