print(colorize("WARN", " * ") + " used by %d other files" % (len(consumers) - MAX_DISPLAY))
print("Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to rebuild packages using these libraries")
-def post_emerge(root_config, myopts, mtimedb, retval):
+def post_emerge(myaction, myopts, myfiles,
+ target_root, trees, mtimedb, retval):
"""
Misc. things to run at the end of a merge session.
Display preserved libs warnings
Exit Emerge
+ @param myaction: The action returned from parse_opts()
+ @type myaction: String
+ @param myopts: emerge options
+ @type myopts: dict
+ @param myfiles: emerge arguments
+ @type myfiles: list
+ @param target_root: The target ROOT for myaction
+ @type target_root: String
@param trees: A dictionary mapping each ROOT to it's package databases
@type trees: dict
@param mtimedb: The mtimeDB to store data needed across merge invocations
1. Calls sys.exit(retval)
"""
- target_root = root_config.root
- trees = { target_root : root_config.trees }
+ root_config = trees[target_root]["root_config"]
vardbapi = trees[target_root]["vartree"].dbapi
settings = vardbapi.settings
info_mtimes = mtimedb["info"]
rval = action_uninstall(settings, trees, mtimedb["ldpath"],
myopts, myaction, myfiles, spinner)
if not (myaction == 'deselect' or buildpkgonly or fetchonly or pretend):
- post_emerge(root_config, myopts, mtimedb, rval)
+ post_emerge(myaction, myopts, myfiles, settings["ROOT"],
+ trees, mtimedb, rval)
return rval
elif myaction == 'info':
display_news_notification(root_config, myopts)
retval = action_build(settings, trees, mtimedb,
myopts, myaction, myfiles, spinner)
- root_config = trees[settings["ROOT"]]["root_config"]
- post_emerge(root_config, myopts, mtimedb, retval)
+ post_emerge(myaction, myopts, myfiles, settings["ROOT"],
+ trees, mtimedb, retval)
return retval