return pkgs_to_remove
cleanlist = create_cleanlist()
+ clean_set = set(cleanlist)
- if len(cleanlist):
- clean_set = set(cleanlist)
+ if cleanlist and myopts.get('--depclean-lib-check') != 'n':
# Check if any of these package are the sole providers of libraries
# with consumers that have not been selected for removal. If so, these
return 0, [], False, required_pkgs_total
clean_set = set(cleanlist)
+ if True:
# Use a topological sort to create an unmerge order such that
# each package is unmerged before it's dependencies. This is
# necessary to avoid breaking things that may need to run
default_arg_opts = {
'--complete-graph' : ('n',),
'--deep' : valid_integers,
+ '--depclean-lib-check' : ('n',),
'--deselect' : ('n',),
'--binpkg-respect-use' : ('n', 'y',),
'--fail-clean' : ('n',),
"action" : "store"
},
+ "--depclean-lib-check": {
+ "help" : "check for consumers of libraries before removing them",
+ "type" : "choice",
+ "choices" : ("True", "n")
+ },
+
"--deselect": {
"help" : "remove atoms/sets from the world file",
"type" : "choice",
else:
myoptions.complete_graph = None
+ if myoptions.depclean_lib_check in ("True",):
+ myoptions.depclean_lib_check = True
+
if myoptions.exclude:
exclude = []
bad_atoms = []