diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-06-15 13:57:12 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-06-15 13:57:12 -0700 |
commit | 6938064ec0b64c2896cb849a385910cc558c4032 (patch) | |
tree | 5a6c886f950c97975a2b4ccaa3b5a1ad03683a84 | |
parent | e0ef2f94364020be21b0ca0ba39e53809d865d5d (diff) | |
download | portage-6938064ec0b64c2896cb849a385910cc558c4032.tar.gz portage-6938064ec0b64c2896cb849a385910cc558c4032.tar.bz2 portage-6938064ec0b64c2896cb849a385910cc558c4032.zip |
Bug #321871 - Check manifests in all modes and trigger 'manifest.bad'
when appropriate.
-rwxr-xr-x | bin/repoman | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/bin/repoman b/bin/repoman index b2a2e0bfc..be1125a34 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1004,14 +1004,7 @@ for x in scanlist: if repolevel < 2: checkdir_relative = os.path.join(catdir, checkdir_relative) checkdir_relative = os.path.join(".", checkdir_relative) - - if options.mode == 'manifest-check': - repoman_settings['O'] = checkdir - repoman_settings['PORTAGE_QUIET'] = '1' - if not portage.digestcheck([], repoman_settings, strict=1): - stats["manifest.bad"] += 1 - fails["manifest.bad"].append(os.path.join(x, 'Manifest')) - continue + generated_manifest = False if options.mode == "manifest" or \ options.mode in ('commit', 'fix') and not options.pretend: @@ -1037,9 +1030,13 @@ for x in scanlist: portage._doebuild_manifest_exempt_depend -= 1 repoman_settings["O"] = checkdir - if not digestgen(mysettings=repoman_settings, myportdb=portdb): + generated_manifest = digestgen( + mysettings=repoman_settings, myportdb=portdb) + + if not generated_manifest: print("Unable to generate manifest.") dofail = 1 + if options.mode == "manifest": if not dofail and options.force and auto_assumed and \ 'assume-digests' in repoman_settings.features: @@ -1063,6 +1060,17 @@ for x in scanlist: elif dofail: sys.exit(1) + if not generated_manifest: + repoman_settings['O'] = checkdir + repoman_settings['PORTAGE_QUIET'] = '1' + if not portage.digestcheck([], repoman_settings, strict=1): + stats["manifest.bad"] += 1 + fails["manifest.bad"].append(os.path.join(x, 'Manifest')) + repoman_settings.pop('PORTAGE_QUIET', None) + + if options.mode == 'manifest-check': + continue + checkdirlist=os.listdir(checkdir) ebuildlist=[] pkgs = {} |