|
|
|
@ -1412,8 +1412,8 @@ class InstalledPackageInfo():
|
|
|
|
|
"""
|
|
|
|
|
depend_pattern = 'declare (?:-x )?({0})="([^"]+)"'
|
|
|
|
|
re_depend = re.compile(depend_pattern.format(
|
|
|
|
|
"|".join(EbuildInfo.support_keys)), re.DOTALL)
|
|
|
|
|
re_multispace = re.compile("\s+", re.DOTALL)
|
|
|
|
|
"|".join(EbuildInfo.support_keys)).encode('UTF-8'), re.DOTALL)
|
|
|
|
|
re_multispace = re.compile(b"\s+", re.DOTALL)
|
|
|
|
|
|
|
|
|
|
def __init__(self, atom, pkg_dir):
|
|
|
|
|
self.atom = atom
|
|
|
|
@ -1427,10 +1427,10 @@ class InstalledPackageInfo():
|
|
|
|
|
env_path = path.join(self._pkg_path, 'environment.bz2')
|
|
|
|
|
if path.exists(env_path):
|
|
|
|
|
with bz2.BZ2File(env_path, 'r') as f:
|
|
|
|
|
for r in self.re_depend.finditer(f.read().decode("UTF-8")):
|
|
|
|
|
for r in self.re_depend.finditer(f.read()):
|
|
|
|
|
key, value = r.groups()
|
|
|
|
|
value = self.re_multispace.sub(" ", value)
|
|
|
|
|
info[key] = value.strip()
|
|
|
|
|
value = self.re_multispace.sub(b" ", value)
|
|
|
|
|
info[key.decode('UTF-8')] = value.strip().decode('UTF-8')
|
|
|
|
|
rep_path = path.join(self._pkg_path, 'repository')
|
|
|
|
|
info['repository'] = readFile(rep_path).strip()
|
|
|
|
|
return EbuildInfo.prepare_use_flags(info)
|
|
|
|
|