diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-26 02:26:58 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-26 02:26:58 -0700 |
commit | 0faca588d881865be6eafc9b6401124bb927bee5 (patch) | |
tree | aafefd19c86bcae63a020591ea25e5d05b069699 | |
parent | If more than 20 file collisions occur, only look up the first 20 since (diff) | |
download | portage-multirepo-0faca588d881865be6eafc9b6401124bb927bee5.tar.gz portage-multirepo-0faca588d881865be6eafc9b6401124bb927bee5.tar.bz2 portage-multirepo-0faca588d881865be6eafc9b6401124bb927bee5.zip |
Allow the --depclean library consumer check to be disabled by
--depclean-lib-check=n.
-rw-r--r-- | pym/_emerge/actions.py | 5 | ||||
-rw-r--r-- | pym/_emerge/main.py | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index a379af8c..07b3a663 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -871,9 +871,9 @@ def calc_depclean(settings, trees, ldpath_mtimes, 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 @@ -1058,6 +1058,7 @@ def calc_depclean(settings, trees, ldpath_mtimes, 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 diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 4e621d21..b553e15e 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -390,6 +390,7 @@ def insert_optional_args(args): default_arg_opts = { '--complete-graph' : ('n',), '--deep' : valid_integers, + '--depclean-lib-check' : ('n',), '--deselect' : ('n',), '--binpkg-respect-use' : ('n', 'y',), '--fail-clean' : ('n',), @@ -554,6 +555,12 @@ def parse_opts(tmpcmdline, silent=False): "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", @@ -738,6 +745,9 @@ def parse_opts(tmpcmdline, silent=False): else: myoptions.complete_graph = None + if myoptions.depclean_lib_check in ("True",): + myoptions.depclean_lib_check = True + if myoptions.exclude: exclude = [] bad_atoms = [] |