self.modifying()
if self.mycpv == mycpv:
return
+ has_changed = False
self.mycpv = mycpv
cp = dep_getkey(mycpv)
pkginternaluse = ""
pkginternaluse = " ".join([x[1:] \
for x in mydb.aux_get(mycpv, ["IUSE"])[0].split() \
if x.startswith("+")])
- self.configdict["pkginternal"]["USE"] = pkginternaluse
+ if pkginternaluse != self.configdict["pkginternal"].get("USE", ""):
+ self.configdict["pkginternal"]["USE"] = pkginternaluse
+ has_changed = True
defaults = []
for i in xrange(len(self.profiles)):
defaults.append(self.make_defaults_use[i])
best_match = best_match_to_list(self.mycpv, cpdict.keys())
if best_match:
defaults.append(cpdict[best_match])
- self.configdict["defaults"]["USE"] = " ".join(defaults)
+ defaults = " ".join(defaults)
+ if defaults != self.configdict["defaults"]["USE"]:
+ self.configdict["defaults"]["USE"] = defaults
+ has_changed = True
useforce = []
for i in xrange(len(self.profiles)):
useforce.append(self.useforce_list[i])
best_match = best_match_to_list(self.mycpv, cpdict.keys())
if best_match:
useforce.append(cpdict[best_match])
- self.useforce = set(stack_lists(useforce, incremental=True))
+ useforce = set(stack_lists(useforce, incremental=True))
+ if useforce != self.useforce:
+ self.useforce = useforce
+ has_changed = True
usemask = []
for i in xrange(len(self.profiles)):
usemask.append(self.usemask_list[i])
best_match = best_match_to_list(self.mycpv, cpdict.keys())
if best_match:
usemask.append(cpdict[best_match])
- self.usemask = set(stack_lists(usemask, incremental=True))
+ usemask = set(stack_lists(usemask, incremental=True))
+ if usemask != self.usemask:
+ self.usemask = usemask
+ has_changed = True
+ oldpuse = self.puse
self.puse = ""
if self.pusedict.has_key(cp):
self.pusekey = best_match_to_list(self.mycpv, self.pusedict[cp].keys())
if self.pusekey:
self.puse = " ".join(self.pusedict[cp][self.pusekey])
+ if oldpuse != self.puse:
+ has_changed = True
self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file
self.configdict["pkg"]["USE"] = self.puse[:] # this gets appended to USE
# CATEGORY is essential for doebuild calls
self.configdict["pkg"]["CATEGORY"] = mycpv.split("/")[0]
- self.reset(keeping_pkg=1,use_cache=use_cache)
+ if has_changed:
+ self.reset(keeping_pkg=1,use_cache=use_cache)
def setinst(self,mycpv,mydbapi):
self.modifying()
"Invalid ebuild path: '%s'" % myebuild)
if mydo != "depend":
- # XXX: We're doing a little hack here to curtain the gvisible locking
- # XXX: that creates a deadlock... Really need to isolate that.
- mysettings.reset(use_cache=use_cache)
mysettings.setcpv(mycpv, use_cache=use_cache, mydb=mydbapi)
+ """For performance reasons, setcpv only triggers regenerate when it
+ detects a package-specific change in config. For the ebuild
+ environment, a regenerate call is forced in order to ensure that the
+ latest env.d variables are used."""
+ mysettings.regenerate()
mysettings["EBUILD_PHASE"] = mydo