print " "+green("*")+" Processed",icount,"info files."
-def post_emerge(settings, info_mtimes, retval):
+def post_emerge(settings, mtimedb, retval):
target_root = settings["ROOT"]
+ info_mtimes = mtimedb["info"]
config_protect = settings.get("CONFIG_PROTECT","").split()
infodirs = settings.get("INFOPATH","").split(":") + \
settings.get("INFODIR","").split(":")
chk_updated_info_files(target_root, infodirs, info_mtimes, retval)
chk_updated_cfg_files(target_root, config_protect)
+ mtimedb.commit()
sys.exit(retval)
sys.exit(1)
searchinstance.output()
-def action_depclean(settings, trees, info_mtimes, ldpath_mtimes,
+def action_depclean(settings, trees, ldpath_mtimes,
myopts, spinner):
# Kill packages that aren't explicitly merged or are required as a
# dependency of another package. World file is explicit.
print "Number to remove: "+str(len(cleanlist))
else:
print "Number removed: "+str(len(cleanlist))
- post_emerge(settings, info_mtimes, 0)
def action_build(settings, trees, mtimedb,
myopts, myaction, myfiles, spinner):
- info_mtimes = mtimedb["info"]
ldpath_mtimes = mtimedb["ldpath"]
favorites=[]
if ("--ask" in myopts or "--pretend" in myopts) and not "--quiet" in myopts:
portage.writemsg_stdout(colorize("WARN", "WARNING:")
+ " AUTOCLEAN is disabled. This can cause serious"
+ " problems due to overlapping packages.\n")
- if "--pretend" not in myopts:
- post_emerge(settings, info_mtimes, 0)
def parse_opts(tmpcmdline):
myaction=None
os.umask(022)
settings, trees, mtimedb = load_emerge_config()
portdb = trees["/"]["porttree"].dbapi
- info_mtimes = mtimedb["info"]
ldpath_mtimes = mtimedb["ldpath"]
xterm_titles = "notitles" not in settings.features
if 1 == unmerge(settings, myopts, vartree, myaction, myfiles,
ldpath_mtimes, raise_on_missing=False):
if "--pretend" not in myopts:
- post_emerge(settings, info_mtimes, 0)
+ post_emerge(settings, mtimedb, 0)
elif "depclean"==myaction:
- action_depclean(settings, trees, info_mtimes, ldpath_mtimes,
+ action_depclean(settings, trees, ldpath_mtimes,
myopts, spinner)
+ if "--pretend" not in myopts:
+ post_emerge(settings, mtimedb, 0)
# "update", "system", or just process files:
else:
action_build(settings, trees, mtimedb,
myopts, myaction, myfiles, spinner)
+ if "--pretend" not in myopts:
+ post_emerge(settings, mtimedb, 0)
if __name__ == "__main__":
emerge_main()