summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/repoman52
1 files changed, 51 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index 067a7715d..e048d18e1 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -7,6 +7,7 @@
# Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems)
# that last one is tricky because multiple profiles need to be checked.
+import commands
import codecs
import errno
import formatter
@@ -489,6 +490,29 @@ repodir = startdir
for x in range(0, repolevel - 1):
repodir = os.path.dirname(repodir)
+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.")
+
+def parse_use_local_desc(mylines, usedict=None):
+ """returns a dict of the form {cpv:set(flags)}"""
+ if usedict is None:
+ usedict = {}
+ lineno = 0
+ for l in mylines:
+ lineno += 1
+ if not l or l.startswith("#"):
+ continue
+ mysplit = l.split(None, 1)
+ if not mysplit:
+ continue
+ mysplit = mysplit[0].split(":")
+ if len(mysplit) != 2:
+ raise ParseError("line %d: Malformed input: '%s'" % \
+ (lineno, l.rstrip("\n")))
+ usedict.setdefault(mysplit[0], set())
+ usedict[mysplit[0]].add(mysplit[1])
+ return usedict
+
# retreive local USE list
luselist={}
try:
@@ -544,8 +568,34 @@ if portdir_overlay != portdir:
kwlist.update(portage.grabfile(
os.path.join(portdir_overlay, "profiles", "arch.list")))
-scanlist = utilities.FindPackagesToScan(repoman_settings, startdir, reposplit)
+scanlist=[]
+if repolevel==2:
+ #we are inside a category directory
+ catdir=reposplit[-1]
+ if catdir not in repoman_settings.categories:
+ caterror(catdir)
+ mydirlist=os.listdir(startdir)
+ for x in mydirlist:
+ if x == "CVS" or x.startswith("."):
+ continue
+ if os.path.isdir(startdir+"/"+x):
+ scanlist.append(catdir+"/"+x)
+elif repolevel==1:
+ for x in repoman_settings.categories:
+ if not os.path.isdir(startdir+"/"+x):
+ continue
+ for y in os.listdir(startdir+"/"+x):
+ if y == "CVS" or y.startswith("."):
+ continue
+ if os.path.isdir(startdir+"/"+x+"/"+y):
+ scanlist.append(x+"/"+y)
+elif repolevel==3:
+ catdir = reposplit[-2]
+ if catdir not in repoman_settings.categories:
+ caterror(catdir)
+ scanlist.append(catdir+"/"+reposplit[-1])
scanlist.sort()
+
logging.debug("Found the following packages to scan:\n%s" % '\n'.join(scanlist))
profiles={}