diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-28 11:51:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-28 11:51:54 +0000 |
commit | 86712380af4bc027a81e0725b100b842a05f1150 (patch) | |
tree | ee50ddcc4cfa25c6de0c6820d012c6dc49d3cc7f /bin/emerge | |
parent | 99906eb21a7b93836a0bef58862df128dbaf92b0 (diff) | |
download | portage-86712380af4bc027a81e0725b100b842a05f1150.tar.gz portage-86712380af4bc027a81e0725b100b842a05f1150.tar.bz2 portage-86712380af4bc027a81e0725b100b842a05f1150.zip |
Make --prune and --depclean operate with missing dependencies when only
asked to remove specific packages since it's relatively safe in this case.
(trunk r9451)
svn path=/main/branches/2.1.2/; revision=9551
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index 053d885b0..b72bfca68 100755 --- a/bin/emerge +++ b/bin/emerge @@ -5910,6 +5910,14 @@ def action_depclean(settings, trees, ldpath_mtimes, # Kill packages that aren't explicitly merged or are required as a # dependency of another package. World file is explicit. + # Global depclean or prune operations are not very safe when there are + # missing dependencies since it's unknown how badly incomplete + # the dependency graph is, and we might accidentally remove packages + # that should have been pulled into the graph. On the other hand, it's + # relatively safe to ignore missing deps when only asked to remove + # specific packages. + allow_missing_deps = len(myfiles) > 0 + msg = [] msg.append("Depclean may break link level dependencies. Thus, it is\n") msg.append("recommended to use a tool such as " + good("`revdep-rebuild`") + " (from\n") @@ -6124,13 +6132,13 @@ def action_depclean(settings, trees, ldpath_mtimes, if "--quiet" not in myopts: print "\b\b... done!\n" - if unresolveable: + if unresolveable and not allow_missing_deps: print "Dependencies could not be completely resolved due to" print "the following required packages not being installed:" print for atom in unresolveable: print atom, "required by", " ".join(unresolveable[atom]) - if unresolveable: + if unresolveable and not allow_missing_deps: print print "Have you forgotten to run " + good("`emerge --update --newuse --deep world`") + " prior to" print "%s? It may be necessary to manually uninstall packages that no longer" % action |