diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-02-19 02:32:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-02-19 02:32:37 +0000 |
commit | d21efe251f1703f82569128e8d098a6bfbd511a6 (patch) | |
tree | f6ea926055958525a0cbb231124b80b304894354 | |
parent | 326855e0ac6e0b6296d727ffcfa8b8a4e514f584 (diff) | |
download | portage-d21efe251f1703f82569128e8d098a6bfbd511a6.tar.gz portage-d21efe251f1703f82569128e8d098a6bfbd511a6.tar.bz2 portage-d21efe251f1703f82569128e8d098a6bfbd511a6.zip |
Revert back to some known working code from the 2.1.2 branch.
svn path=/main/trunk/; revision=9352
-rwxr-xr-x | bin/repoman | 52 |
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={} |