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 5F7261381F3 for ; Thu, 13 Jun 2013 16:35:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F455E09D5; Thu, 13 Jun 2013 16:34:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 53052E09DA for ; Thu, 13 Jun 2013 16:34:32 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 225F533E4C9 for ; Thu, 13 Jun 2013 16:34:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A0CE1E547B for ; Thu, 13 Jun 2013 16:34:28 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1370455442.7e66abd0a28b088f3a657f483b1ed091b5d9a938.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/argutil.py roverlay/main.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 7e66abd0a28b088f3a657f483b1ed091b5d9a938 X-VCS-Branch: master Date: Thu, 13 Jun 2013 16:34:28 +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: fb2330a0-e64c-4237-aeec-fa4dd8462115 X-Archives-Hash: 89c1283695184f724f9d038a1105cd0e Message-ID: <20130613163428.F-5JCrZorELddrb3qAHisH-ig5khKzGHpbOy5U8P_m0@z> commit: 7e66abd0a28b088f3a657f483b1ed091b5d9a938 Author: André Erdmann mailerd de> AuthorDate: Wed Jun 5 18:04:02 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Jun 5 18:04:02 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=7e66abd0 roverlay/main: --fixup-category-move[-reverse] --- roverlay/argutil.py | 30 ++++++++++++++++++++++++++++-- roverlay/main.py | 5 +++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/roverlay/argutil.py b/roverlay/argutil.py index 689fe78..90d95df 100644 --- a/roverlay/argutil.py +++ b/roverlay/argutil.py @@ -88,7 +88,9 @@ def get_parser ( command_map, default_config_file, default_command='create' ): ), add_help=True, formatter_class=argparse.RawDescriptionHelpFormatter, - ) + ) + + incremental_mutex = parser.add_mutually_exclusive_group() arg = parser.add_argument opt_in = dict ( default=False, action='store_true' ) @@ -223,6 +225,28 @@ def get_parser ( command_map, default_config_file, default_command='create' ): action='store_true', ) + incremental_mutex.add_argument ( + '--fixup-category-move', + help=''' + remove packages from the default category + if they exist in another one + ''', + dest='fixup_category_move', + default=None, + action='store_true' + ) + + incremental_mutex.add_argument ( + '--fixup-category-move-reverse', + help=''' + remove packages from other categories if they exist in the + default one + ''', + default=None, + dest='fixup_category_move_rev', + action='store_true' + ) + arg ( '--stats', help="print some stats", @@ -288,7 +312,7 @@ def get_parser ( command_map, default_config_file, default_command='create' ): # --no-incremental currently means that an existing overlay won't be # scanned for ebuilds (which means that ebuilds will be recreated), # but old ebuilds won't be explicitly removed - arg ( + incremental_mutex.add_argument ( '--no-incremental', help="start overlay creation from scratch (ignore an existing overlay)", dest='incremental', @@ -365,6 +389,8 @@ def parse_argv ( command_map, **kw ): incremental = p.incremental, immediate_ebuild_writes = p.immediate_ebuild_writes, dump_file = p.dump_file, + fixup_category_move = p.fixup_category_move, + fixup_category_move_rev = p.fixup_category_move_rev, ) if given ( 'overlay' ): diff --git a/roverlay/main.py b/roverlay/main.py index ab75099..a0ca8e4 100644 --- a/roverlay/main.py +++ b/roverlay/main.py @@ -272,6 +272,11 @@ def main ( overlay_creator.release_package_rules() + if OPTION ( 'fixup_category_move' ): + overlay_creator.remove_moved_ebuilds ( reverse=False ) + elif OPTION ( 'fixup_category_move_rev' ): + overlay_creator.remove_moved_ebuilds ( reverse=True ) + overlay_creator.run ( close_when_done=True ) optionally ( overlay_creator.write_overlay, 'write_overlay' )