From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 96569138D0C for ; Mon, 6 Jul 2015 01:39:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A0D2E0948; Mon, 6 Jul 2015 01:39:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A57BEE0948 for ; Mon, 6 Jul 2015 01:39:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6BB2834097F for ; Mon, 6 Jul 2015 01:39:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8C758742 for ; Mon, 6 Jul 2015 01:39:23 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1436146911.743853d076e647b383fd7762168cc708d1f9709a.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: / X-VCS-Repository: proj/grss X-VCS-Files: grsup X-VCS-Directories: / X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 743853d076e647b383fd7762168cc708d1f9709a X-VCS-Branch: master Date: Mon, 6 Jul 2015 01:39:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 565bce58-76c3-493d-b545-e4f05c0cf9e3 X-Archives-Hash: 4439ae13e5ed5f57e08e00d80c034462 commit: 743853d076e647b383fd7762168cc708d1f9709a Author: Anthony G. Basile gentoo org> AuthorDate: Mon Jul 6 01:41:51 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Jul 6 01:41:51 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=743853d0 grsup: some bug fixes. grsup | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/grsup b/grsup index bb5330f..d956af9 100755 --- a/grsup +++ b/grsup @@ -95,16 +95,11 @@ def install_kernel(version = 'latest', logfile = CONST.LOGFILE): def usage(rc=1): usage = """ -usage: grsup -C - grsup -k kernel - grsup [-r|-d] pkg(s) - grsup -h - -flags: -C download all world packages - : -k kernel version, or 'latest' - : -r re-emerge the pkgs(s) - : -d unmerge the pkgs(s) - : -h print this help file +usage: grsup [pkg(s)] : update @world or pkg(s) if given + grsup [-r|-d] pkg(s) : re-install or delete pkg(s) + grsup -C : download all @world pkgs, don't install + grsup -k kernel : install 'kernel' version, or 'latest' + grsup -h : print this help """ print(usage) sys.exit(rc) @@ -112,38 +107,39 @@ flags: -C download all world packages def main(): myaction, myopts, myfiles = parse_opts(sys.argv[1:]) - args = copy.deepcopy(myfiles) try: opts, x = getopt(sys.argv[1:], 'Ck:rdh') except GetoptError: usage() + do_install_kernel = False if len(opts) == 0: - args.insert(0, '-gKuDq') + args = ['-g', '-K', '-u', '-D', '-q'] if len(myfiles) == 0: - usage() + myfiles = ['@world'] + args.extend(myfiles) else: exclude = 0 - do_install_kernel = False for o, a in opts: if o == '-h': usage(rc=0) elif o == '-r': if len(myfiles) == 0 or exclude > 1: usage() - args.insert(0, '-gKDq') + args = ['-g', '-K', '-D', '-q'] + args.extend(myfiles) exclude += 1 elif o == '-d': if len(myfiles) == 0 or exclude > 1: usage() - args.insert(0, '--unmerge') - args.insert(0, '-q') + args = ['-C', '-q'] + args.extend(myfiles) exclude += 1 elif o == '-C': if len(myfiles) > 0: usage() - args = ['-gefq', '@world'] + args = ['-g', '-e', '-f', '-q', '@world'] elif o == '-k': if len(sys.argv[1:]) != 2: usage()