summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-19 03:27:46 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-19 03:27:46 +0000
commit856a0e33df9b9b64f9a7abe0e9b1fb34b0918794 (patch)
treeb6dd2fc3ceb51a2d2b8f9dcb789d6d6f482e7580 /bin
parentd21efe251f1703f82569128e8d098a6bfbd511a6 (diff)
downloadportage-856a0e33df9b9b64f9a7abe0e9b1fb34b0918794.tar.gz
portage-856a0e33df9b9b64f9a7abe0e9b1fb34b0918794.tar.bz2
portage-856a0e33df9b9b64f9a7abe0e9b1fb34b0918794.zip
Use parse_use_local_desc() from the repoman.utilities module.
svn path=/main/trunk/; revision=9353
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman22
1 files changed, 1 insertions, 21 deletions
diff --git a/bin/repoman b/bin/repoman
index e048d18e1..0ca127dcb 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -493,26 +493,6 @@ 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.")
-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:
@@ -528,7 +508,7 @@ if portdir_overlay != portdir:
if os.path.exists(filename):
try:
f = open(filename)
- parse_use_local_desc(f, luselist)
+ utilities.parse_use_local_desc(f, luselist)
f.close()
except (IOError, OSError, ParseError), e:
logging.exception("Couldn't read from '%s'" % filename, e)