diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/__init__.py | 10 | ||||
-rw-r--r-- | pym/repoman/checks.py | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 65de5aeea..520a86104 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1274,7 +1274,8 @@ class Package(Task): __slots__ = ("built", "cpv", "depth", "installed", "metadata", "onlydeps", "operation", "root_config", "type_name", - "category", "counter", "cp", "cpv_split", "iuse", "mtime", + "category", "counter", "cp", "cpv_split", + "inherited", "iuse", "mtime", "pf", "pv_split", "root", "slot", "slot_atom", "use") metadata_keys = [ @@ -1337,7 +1338,7 @@ class Package(Task): Detect metadata updates and synchronize Package attributes. """ _wrapped_keys = frozenset( - ["COUNTER", "IUSE", "SLOT", "USE", "_mtime_"]) + ["COUNTER", "INHERITED", "IUSE", "SLOT", "USE", "_mtime_"]) def __init__(self, pkg, metadata): dict.__init__(self) @@ -1355,6 +1356,11 @@ class Package(Task): if k in self._wrapped_keys: getattr(self, "_set_" + k.lower())(k, v) + def _set_inherited(self, k, v): + if isinstance(v, basestring): + v = frozenset(v.split()) + self._pkg.inherited = v + def _set_iuse(self, k, v): self._pkg.iuse = self._pkg._iuse( v.split(), self._pkg.root_config.iuse_implicit) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 7bc9d990b..3c202cad8 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -221,11 +221,11 @@ _iuse_def_re = re.compile(r'^IUSE=.*') _comment_re = re.compile(r'(^|\s*)#') _autotools_func_re = re.compile(r'(^|\s)(eautomake|eautoconf|eautoreconf)(\s|$)') -def run_checks(contents, st_mtime, inherited=None): +def run_checks(contents, pkg): checks = list(_constant_checks) - checks.append(EbuildHeader(st_mtime)) + checks.append(EbuildHeader(pkg.mtime)) iuse_def = None - inherit_autotools = inherited and "autotools" in inherited + inherit_autotools = "autotools" in pkg.inherited autotools_func_call = None for num, line in enumerate(contents): comment = _comment_re.match(line) |