if self._getMissingKeywords(pkg, pgroups, mygroups):
return False
- # If replacing all keywords with unstable variants would mask the
- # package, then it's considered stable.
- unstable = []
- for kw in mygroups:
- if kw[:1] != "~":
- kw = "~" + kw
- unstable.append(kw)
-
- return bool(self._getMissingKeywords(pkg, pgroups, set(unstable)))
+ if pkg.cpv._settings.local_config:
+ # If replacing all keywords with unstable variants would mask the
+ # package, then it's considered stable.
+ unstable = []
+ for kw in mygroups:
+ if kw[:1] != "~":
+ kw = "~" + kw
+ unstable.append(kw)
+
+ return bool(self._getMissingKeywords(pkg, pgroups, set(unstable)))
+ else:
+ # For repoman, if the package has an effective stable keyword that
+ # intersects with the effective ACCEPT_KEYWORDS for the current
+ # profile, then consider it stable.
+ for kw in pgroups:
+ if kw[:1] != "~":
+ if kw in mygroups:
+ return True
+ return False
def getMissingKeywords(self,
cpv,
except AttributeError:
raise AttributeError('stable')
stable = settings._isStable(self)
- self.__dict__['_stable'] = stable
+ if settings.local_config:
+ # For repoman, don't cache this value, since
+ # it needs to be re-computed for each profile.
+ self.__dict__['_stable'] = stable
return stable
def pkgsplit(mypkg, silent=1, eapi=None):