Browse Source

Fix get package use flags.

develop
Mike Hiretsky 11 years ago
parent
commit
04a8d63c3a
  1. 10
      pym/cl_utils.py

10
pym/cl_utils.py

@ -872,12 +872,18 @@ def getPkgUses(fullpkg):
return None
usePath = os.path.join(pkgCategory,packages[-1]['PF'],"USE")
iusePath = os.path.join(pkgCategory,packages[-1]['PF'],"IUSE")
iuse = open(iusePath,'r').read().strip().split() \
if os.path.exists(iusePath) else \
[]
use = open(usePath,'r').read().strip().split() \
if os.path.exists(usePath) else \
[]
return (map(lambda x:x[1:] if x.startswith("+") else x,
filter(lambda x:x,
open(usePath,'r').read().strip().split())),
use)),
map(lambda x:x[1:] if x.startswith("+") else x,
filter(lambda x:x,
open(iusePath,'r').read().strip().split())))
iuse)))
def getPkgActiveUses(fullpkg):
"""Get active uses from package"""

Loading…
Cancel
Save