summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-09-29 16:43:08 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-09-29 16:43:08 +0000
commitf0ba1758da6b088c5e745959bf8aaeb9fd07ec22 (patch)
treeb3ee818360095d74682fc5bde80c0f0845694cab /bin
parent9137b52c75e1210c86f6b9f04835d566323ae19f (diff)
downloadportage-f0ba1758da6b088c5e745959bf8aaeb9fd07ec22.tar.gz
portage-f0ba1758da6b088c5e745959bf8aaeb9fd07ec22.tar.bz2
portage-f0ba1758da6b088c5e745959bf8aaeb9fd07ec22.zip
Make depclean a little friendler (so that perhaps people will read the messages? ;)
svn path=/main/branches/2.0/; revision=2061
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge60
1 files changed, 27 insertions, 33 deletions
diff --git a/bin/emerge b/bin/emerge
index 7db55c06b..fb180d219 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2951,33 +2951,37 @@ elif "depclean"==myaction:
# dependency of another package. World file is explicit.
print
- print red("*** WARNING ***")+" : DEPCLEAN CAN SERIOUSLY IMPAIR YOUR SYSTEM. USE CAUTION."
- print red("*** WARNING ***")+" : (Cancel: CONTROL-C) -- ALWAYS VERIFY ALL PACKAGES IN THE"
- print red("*** WARNING ***")+" : CANDIDATE LIST FOR SANITY BEFORE ALLOWING DEPCLEAN TO"
- print red("*** WARNING ***")+" : UNMERGE ANY PACKAGES."
- print red("*** WARNING ***")+" :"
- print red("*** WARNING ***")+" : USE FLAGS MAY HAVE AN EXTREME EFFECT ON THE OUTPUT."
- print red("*** WARNING ***")+" : SOME LIBRARIES MAY BE USED BY PACKAGES BUT ARE NOT"
- print red("*** WARNING ***")+" : CONSIDERED TO BE A DEPEND DUE TO USE FLAG SETTINGS."
- print red("*** WARNING ***")+" : emerge --update --deep --newuse world TO VERIFY"
- print red("*** WARNING ***")+" : SANITY IN THIS REGARD."
- print red("*** WARNING ***")+" :"
- print red("*** WARNING ***")+" : Packages in the list that are desired may be added"
- print red("*** WARNING ***")+" : directly to the world file to cause them to be ignored"
- print red("*** WARNING ***")+" : by depclean and maintained in the future. BREAKAGES DUE"
- print red("*** WARNING ***")+" : TO UNMERGING AN ==IN-USE LIBRARY== MAY BE REPAIRED BY"
- print red("*** WARNING ***")+" : MERGING *** THE PACKAGE THAT COMPLAINS *** ABOUT THE"
- print red("*** WARNING ***")+" : MISSING LIBRARY."
- print
- if ("--pretend" not in myopts) and ("--ask" not in myopts):
- countdown(EMERGE_WARNING_DELAY, ">>> Depclean")
- emergelog(" >>> depclean")
+ print red("*** WARNING ***")+" --depclean is known to be broken. It is highly recommended"
+ print red("*** WARNING ***")+" that "+green("`emerge --update --newuse --deep world`")+" be ran before"
+ print red("*** WARNING ***")+" commencing. However, using --depclean may still break link"
+ print red("*** WARNING ***")+" level consistency within your system. "+green("`revdep-rebuild`")
+ print red("*** WARNING ***")+" from app-portage/gentoolkit can help to detect breakage."
+ print red("*** WARNING ***")
+ print red("*** WARNING ***")+" Also study the list of packages to be cleaned for any"
+ print red("*** WARNING ***")+" obvious mistakes. Packages can be manually added to the"
+ print red("*** WARNING ***")+" world list by running "+green("`emerge --noreplace <atom>`")+"."
+ print red("*** WARNING ***")
+ print red("*** WARNING ***")+" "+bold("Make sure you have a backup.")
- mydepgraph=depgraph(myaction,myopts)
syslist=getlist("system")
worldlist=getlist("world")
+ myvarlist=portage.vardbapi(portage.root).cp_all()
+
+ if not syslist:
+ print "\n!!! You have no system list.",
+ if not worldlist:
+ print "\n!!! You have no world file.",
+ if not myvarlist:
+ print "\n!!! You have no installed package database (%s)." % portage.VDB_PATH,
+
+ if not (syslist and worldlist and myvarlist):
+ print "\n!!! Proceeding will break your installation.\n"
+ countdown(EMERGE_WARNING_DELAY, ">>> Depclean")
+
+ emergelog(" >>> depclean")
+ mydepgraph=depgraph(myaction,myopts)
- print "Calculating",myaction,"dependencies ",
+ print "\nCalculating dependencies ",
if not mydepgraph.xcreate("world"):
print "\n!!! Failed to create deptree."
sys.exit(1)
@@ -2991,19 +2995,9 @@ elif "depclean"==myaction:
sys.exit(1)
alldeps=mydepgraph.digraph.allnodes()
- myvarlist=portage.vardbapi(portage.root).cp_all()
- if not syslist:
- print "!!! You have no system list. Cannot determine system from world."
- if not worldlist:
- print "!!! You have no world file. Cannot determine explicit merges."
- if not myvarlist:
- print "!!! You have no installed package tree (%s). This is a problem." % portage.VDB_PATH
if not alldeps:
print "!!! You have no dependencies. Impossible. Bug."
-
- if not (syslist and worldlist and myvarlist and alldeps):
- print
sys.exit(1)
reallist=[]