Redirect all build output to logs alone, and do not
display it on stdout.
.TP
+.BR \-\-quiet\-unmerge\-warn
+Disable the warning message that's shown prior to
+\fB\-\-unmerge\fR actions. This option is intended
+to be set in the \fBmake.conf\fR(5)
+\fBEMERGE_DEFAULT_OPTS\fR variable.
+.TP
.BR "\-\-rebuilt\-binaries[=n]"
Replace installed packages with binary packages that have
been rebuilt. Rebuilds are detected by comparison of
if files and not valid_atoms:
return 1
- if action == 'unmerge' and '--quiet' not in opts:
+ if action == 'unmerge' and \
+ '--quiet' not in opts and \
+ '--quiet-unmerge-warn' not in opts:
msg = "This action can remove important packages! " + \
"In order to be safer, use " + \
"`emerge -pv --depclean <atom>` to check for " + \
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
+ print(" "+green("--quiet-unmerge-warn"))
+ desc = "Disable the warning message that's shown prior to " + \
+ "--unmerge actions. This option is intended " + \
+ "to be set in the make.conf(5) " + \
+ "EMERGE_DEFAULT_OPTS variable."
+ for line in wrap(desc, desc_width):
+ print(desc_indent + line)
+ print()
print(" "+green("--rebuilt-binaries") + "[=%s]" % turquoise("n"))
desc = "Replace installed packages with binary packages that have " + \
"been rebuilt. Rebuilds are detected by comparison of " + \
"--onlydeps", "--pretend",
"--quiet",
"--quiet-build",
+"--quiet-unmerge-warn",
"--resume",
"--searchdesc",
"--skipfirst",
bindb = trees["/"]["bintree"].dbapi
if not os.access(bindb.bintree.pkgdir, os.W_OK):
bindb = None
+ else:
+ # Call binarytree.populate(), since we want to make sure it's
+ # only populated with local packages here (getbinpkgs=0).
+ bindb.bintree.populate()
for update_cmd in myupd:
if update_cmd[0] == "move":
moves = vardb.move_ent(update_cmd)
self.bintree.populate()
return fakedbapi.match(self, *pargs, **kwargs)
+ def cpv_inject(self, cpv, **kwargs):
+ self._aux_cache.pop(cpv, None)
+ fakedbapi.cpv_inject(cpv, **kwargs)
+
+ def cpv_remove(self, cpv):
+ self._aux_cache.pop(cpv, None)
+ fakedbapi.cpv_remove(cpv)
+
def aux_get(self, mycpv, wants):
if self.bintree and not self.bintree.populated:
self.bintree.populate()
if not v:
del mydata[k]
mytbz2.recompose_mem(portage.xpak.xpak_mem(mydata))
+ # inject will clear stale caches via cpv_inject.
self.bintree.inject(cpv)
def cp_list(self, *pargs, **kwargs):
if (not os.path.isdir(self.pkgdir) and not getbinpkgs):
return 0
+ # Clear all caches in case populate is called multiple times
+ # as may be the case when _global_updates calls populate()
+ # prior to performing package moves since it only wants to
+ # operate on local packages (getbinpkgs=0).
+ self._remotepkgs = None
+ self.dbapi._clear_cache()
+ self.dbapi._aux_cache.clear()
if True:
pkg_paths = {}
self._pkg_paths = pkg_paths
writemsg(_("!!! PORTAGE_BINHOST unset, but use is requested.\n"),
noiselevel=-1)
- if getbinpkgs and \
- "PORTAGE_BINHOST" in self.settings and \
- not self._remotepkgs:
-
+ if getbinpkgs and 'PORTAGE_BINHOST' in self.settings:
base_url = self.settings["PORTAGE_BINHOST"]
from portage.const import CACHE_PATH
try:
return
slot = slot.strip()
self.dbapi.cpv_inject(cpv)
- self.dbapi._aux_cache.pop(cpv, None)
# Reread the Packages index (in case it's been changed by another
# process) and then updated it, all while holding a lock.
#dest already exists; keep this puppy where it is.
continue
_movefile(origpath, newpath, mysettings=self.settings)
+ self._clear_pkg_cache(self._dblink(mycpv))
+ self._clear_pkg_cache(self._dblink(mynewcpv))
# We need to rename the ebuild now.
old_pf = catsplit(mycpv)[1]
treetype="vartree", vartree=self.vartree)
if not mylink.exists():
raise KeyError(cpv)
+ self._clear_pkg_cache(mylink)
for k, v in values.items():
if v:
mylink.setfile(k, v)