diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-08-10 20:00:11 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-08-10 20:00:11 -0700 |
commit | 178ba38609cab75b22aa771e4155cc9011130a2e (patch) | |
tree | 10874cea4fde7de48a5f5e45517576e3c1184e18 /bin | |
parent | 022e09dd6ddd8372a9ec2ef2284b7cb174e6e6b2 (diff) | |
download | portage-178ba38609cab75b22aa771e4155cc9011130a2e.tar.gz portage-178ba38609cab75b22aa771e4155cc9011130a2e.tar.bz2 portage-178ba38609cab75b22aa771e4155cc9011130a2e.zip |
repoman: add --if-modified option to check less
This is useful if you want to do a repo-level or category-level commit
but you only want to run checks for the packages that have uncommitted
modifications.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/repoman | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman index f1fbc2444..e806b3125 100755 --- a/bin/repoman +++ b/bin/repoman @@ -209,6 +209,10 @@ def ParseArgs(argv, qahelp): parser.add_option('-x', '--xmlparse', dest='xml_parse', action='store_true', default=False, help='forces the metadata.xml parse check to be carried out') + parser.add_option( + '--if-modified', type='choice', choices=('y', 'n'), default='n', + help='only check packages that have uncommitted modifications') + parser.add_option('-i', '--ignore-arches', dest='ignore_arches', action='store_true', default=False, help='ignore arch-specific failures (where arch != host)') @@ -1068,6 +1072,17 @@ for x in scanlist: if repolevel < 2: checkdir_relative = os.path.join(catdir, checkdir_relative) checkdir_relative = os.path.join(".", checkdir_relative) + + if vcs and options.if_modified == "y": + checkdir_modified = False + checkdir_pattern = checkdir_relative.rstrip(os.sep) + os.sep + for f in chain(mychanged, mynew): + if f.startswith(checkdir_pattern): + checkdir_modified = True + break + if not checkdir_modified: + continue + generated_manifest = False if options.mode == "manifest" or \ |