summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-23 20:36:41 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-23 20:36:41 +0000
commitdf049d9e38f5cb6109096b25431f885a668f6021 (patch)
tree0183892f2b626a13648b4a8b6276c504a7c7e021
parente9a331bd572748a82b611230022e2f0e8474de16 (diff)
downloadportage-df049d9e38f5cb6109096b25431f885a668f6021.tar.gz
portage-df049d9e38f5cb6109096b25431f885a668f6021.tar.bz2
portage-df049d9e38f5cb6109096b25431f885a668f6021.zip
For bug #176539, add a manifest target to repoman so that there's a simple way to just generate a Manifest.
svn path=/main/branches/2.1.2/; revision=6603
-rwxr-xr-xbin/repoman18
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman
index 3f7414c9a..556872a02 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -81,6 +81,7 @@ signal.signal(signal.SIGINT,exithandler)
shortmodes={"ci":"commit"}
modeshelp={
"scan" : "Scan directory tree for QA issues (default)",
+"manifest" : "Generate a Manifest (fetches files if necessary)",
"fix" : "Fix simple QA issues (stray digests, missing digests)",
"full" : "Scan directory tree for QA issues (full listing)",
"help" : "Show this screen",
@@ -486,7 +487,9 @@ for x in range(0,repolevel-1):
def caterror(mycat):
err(mycat+" is not an official category. Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.")
-if "--pretend" in myoptions:
+if mymode == "manifest":
+ pass
+elif "--pretend" in myoptions:
print green("\nRepoMan does a once-over of the neighborhood...")
elif quiet < 1:
print green("\nRepoMan scours the neighborhood...")
@@ -709,7 +712,7 @@ def x11_deprecation_check(depstr):
return True
return False
-
+dofail = 0
arch_caches={}
arch_xmatch_caches = {}
for x in scanlist:
@@ -720,6 +723,14 @@ for x in scanlist:
dadded=[]
catdir,pkgdir=x.split("/")
checkdir=repodir+"/"+x
+
+ if mymode == "manifest":
+ repoman_settings["O"] = checkdir
+ if not portage.digestgen([], repoman_settings, myportdb=portdb):
+ print "Unable to generate manifest."
+ dofail = 1
+ continue
+
checkdirlist=os.listdir(checkdir)
ebuildlist=[]
for y in checkdirlist:
@@ -1374,6 +1385,9 @@ for x in scanlist:
stats["ebuild.allmasked"]+=1
fails["ebuild.allmasked"].append(x)
+if mymode == "manifest":
+ sys.exit(dofail)
+
#Pickle and save results for instant reuse in last and lfull
if os.access(portage_const.CACHE_PATH, os.W_OK):
for myobj, fname in (stats, "repo.stats"), (fails, "repo.fails"):