Print a warning message when AUTOCLEAN is disabled because it's quite dangerous.
authorZac Medico <zmedico@gentoo.org>
Wed, 17 May 2006 05:44:32 +0000 (05:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 17 May 2006 05:44:32 +0000 (05:44 -0000)
svn path=/main/trunk/; revision=3366

bin/emerge

index d9e89c39f07b0351286cef46712f0a4d84b8b7a8..c9b8cd8990b4d64f7580df2f033698bec2ca0912 100755 (executable)
@@ -2077,6 +2077,10 @@ class depgraph:
                                                retval=unmerge("clean", [xsplit[0]])
                                                if not retval:
                                                        emergelog(" --- AUTOCLEAN: Nothing unmerged.")
+                                       else:
+                                               portage.writemsg_stdout(colorize("WARN", "WARNING:")
+                                                       + " AUTOCLEAN is disabled.  This can cause serious"
+                                                       + " problems due to overlapping packages.\n")
 
                                        # Figure out if we need a restart.
                                        mysplit=portage.pkgsplit(x[2])
@@ -3419,4 +3423,8 @@ else:
                if portage.settings["AUTOCLEAN"] and "yes"==portage.settings["AUTOCLEAN"]:
                        print ">>> Auto-cleaning packages..."
                        unmerge("clean", ["world"])
+               else:
+                       portage.writemsg_stdout(colorize("WARN", "WARNING:")
+                               + " AUTOCLEAN is disabled.  This can cause serious"
+                               + " problems due to overlapping packages.\n")
        post_emerge()