Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9551 - main/branches/2.1.2/bin
Date: Fri, 28 Mar 2008 11:51:58
Message-Id: E1JfD7j-0006gu-Rq@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-28 11:51:54 +0000 (Fri, 28 Mar 2008)
3 New Revision: 9551
4
5 Modified:
6 main/branches/2.1.2/bin/emerge
7 Log:
8 Make --prune and --depclean operate with missing dependencies when only
9 asked to remove specific packages since it's relatively safe in this case.
10 (trunk r9451)
11
12
13 Modified: main/branches/2.1.2/bin/emerge
14 ===================================================================
15 --- main/branches/2.1.2/bin/emerge 2008-03-28 11:50:48 UTC (rev 9550)
16 +++ main/branches/2.1.2/bin/emerge 2008-03-28 11:51:54 UTC (rev 9551)
17 @@ -5910,6 +5910,14 @@
18 # Kill packages that aren't explicitly merged or are required as a
19 # dependency of another package. World file is explicit.
20
21 + # Global depclean or prune operations are not very safe when there are
22 + # missing dependencies since it's unknown how badly incomplete
23 + # the dependency graph is, and we might accidentally remove packages
24 + # that should have been pulled into the graph. On the other hand, it's
25 + # relatively safe to ignore missing deps when only asked to remove
26 + # specific packages.
27 + allow_missing_deps = len(myfiles) > 0
28 +
29 msg = []
30 msg.append("Depclean may break link level dependencies. Thus, it is\n")
31 msg.append("recommended to use a tool such as " + good("`revdep-rebuild`") + " (from\n")
32 @@ -6124,13 +6132,13 @@
33 if "--quiet" not in myopts:
34 print "\b\b... done!\n"
35
36 - if unresolveable:
37 + if unresolveable and not allow_missing_deps:
38 print "Dependencies could not be completely resolved due to"
39 print "the following required packages not being installed:"
40 print
41 for atom in unresolveable:
42 print atom, "required by", " ".join(unresolveable[atom])
43 - if unresolveable:
44 + if unresolveable and not allow_missing_deps:
45 print
46 print "Have you forgotten to run " + good("`emerge --update --newuse --deep world`") + " prior to"
47 print "%s? It may be necessary to manually uninstall packages that no longer" % action
48
49 --
50 gentoo-commits@l.g.o mailing list