From 6938064ec0b64c2896cb849a385910cc558c4032 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 15 Jun 2010 13:57:12 -0700 Subject: Bug #321871 - Check manifests in all modes and trigger 'manifest.bad' when appropriate. --- bin/repoman | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'bin') 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 = {} -- cgit v1.2.3-1-g7c22