Merged from trunk -r14781:14803
authorFabian Groffen <grobian@gentoo.org>
Wed, 11 Nov 2009 20:22:58 +0000 (20:22 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 11 Nov 2009 20:22:58 +0000 (20:22 -0000)
   | 14782   | Collapse two [[ ]] into one.                                 |
   | zmedico |                                                              |

   | 14783   | Bug #291200 - Add a --quiet-build option to redirect all     |
   | zmedico | build output to logs alone, and do not display it on stdout. |

   | 14784   | Use writemsg instead of print, to send debug messages to     |
   | zmedico | stderr.                                                      |

   | 14798   | Fix typo in comment.                                         |
   | zmedico |                                                              |

   | 14802   | When displaying masking messages, show the 'dependency       |
   | zmedico | required by' message before the masking docs message.        |

   | 14803   | Make split-elog bold.                                        |
   | zmedico |                                                              |

svn path=/main/branches/prefix/; revision=14811

bin/ebuild.sh
man/emerge.1
man/make.conf.5
pym/_emerge/Scheduler.py
pym/_emerge/depgraph.py
pym/_emerge/help.py
pym/_emerge/main.py

index 899f98e814a2a668aeb6e74aaf0b77b07e507eca..91f75c030bb63fcec4e1d1c02e0b07c056d2c821 100755 (executable)
@@ -1828,7 +1828,7 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
                # interaction begins.
                unset DEPEND RDEPEND PDEPEND IUSE
 
-               if [[ $PORTAGE_DEBUG != 1 ]] || [[ ${-/x/} != $- ]] ; then
+               if [[ $PORTAGE_DEBUG != 1 || ${-/x/} != $- ]] ; then
                        source "$EBUILD" || die "error sourcing ebuild"
                else
                        set -x
index 0035102babb6eef97ae2f89297c9f06418cb3546..b1d5e6752abe5dae28ff4570a37ba8c262bc1d7e 100644 (file)
@@ -471,6 +471,10 @@ b  blocked by another package (automatically resolved conflict)
 Results may vary, but the general outcome is a reduced or condensed
 output from portage's displays.
 .TP
+.BR \-\-quiet\-build
+Redirect all build output to logs alone, and do not
+display it on stdout.
+.TP
 .BR "\-\-reinstall changed\-use"
 Tells emerge to include installed packages where USE flags have
 changed since installation.  Unlike \fB\-\-newuse\fR, this option does
index b9e5c516dbfd9b78ab39e9c2dac4ae833fd6b4c1..d22c43cd7d605f63cafd19c7d701bc9bc92eeace 100644 (file)
@@ -392,7 +392,7 @@ a read-only NFS share. A read-only \fBDISTDIR\fR is not compatible with the
 \fBFEATURES\fR in order to avoid warning messages that are triggered by this
 incompatibility.
 .TP
-split\-elog
+.B split\-elog
 Store logs created by \fBPORTAGE_ELOG_SYSTEM="save"\fR in category
 subdirectories of \fBPORT_LOGDIR/elog\fR, instead of using
 \fBPORT_LOGDIR/elog\fR directly.
index f969f7105f595f3282869e2b369d10b60ae99a2d..1f37a5f0c1afb6188418683dd246ff6e12ed6780 100644 (file)
@@ -294,7 +294,8 @@ class Scheduler(PollScheduler):
                @returns: True if background mode is enabled, False otherwise.
                """
                background = (self._max_jobs is True or \
-                       self._max_jobs > 1 or "--quiet" in self.myopts) and \
+                       self._max_jobs > 1 or "--quiet" in self.myopts \
+                       or "--quiet-build" in self.myopts) and \
                        not bool(self._opts_no_background.intersection(self.myopts))
 
                if background:
index ef8233684754452b1620ff86bb372fdbc26aba62..8b83cf7249fc3f72c4d37ad2636edae7691799fd 100644 (file)
@@ -1133,10 +1133,12 @@ class depgraph(object):
                                if not dep_string:
                                        continue
                                if debug:
-                                       print()
-                                       print("Parent:   ", jbigkey)
-                                       print("Depstring:", dep_string)
-                                       print("Priority:", dep_priority)
+                                       writemsg_level("\nParent:    %s\n" % (pkg,),
+                                               noiselevel=-1, level=logging.DEBUG)
+                                       writemsg_level("Depstring: %s\n" % (dep_string,),
+                                               noiselevel=-1, level=logging.DEBUG)
+                                       writemsg_level("Priority:  %s\n" % (dep_priority,),
+                                               noiselevel=-1, level=logging.DEBUG)
 
                                try:
 
@@ -1272,7 +1274,8 @@ class depgraph(object):
                                        return 0
 
                if debug:
-                       print("Exiting...", pkg)
+                       writemsg_level("Exiting... %s\n" % (pkg,),
+                               noiselevel=-1, level=logging.DEBUG)
 
                return 1
 
@@ -1340,7 +1343,7 @@ class depgraph(object):
                                        atom_pkg_graph.remove(pkg)
 
                        # Yield < and <= atoms first, since those are more likely to
-                       # cause a slot conflicts, and we want those atoms to be displayed
+                       # cause slot conflicts, and we want those atoms to be displayed
                        # in the resulting slot conflict message (see bug #291142).
                        less_than = []
                        not_less_than = []
@@ -2193,6 +2196,8 @@ class depgraph(object):
                        else:
                                show_missing_use = unmasked_iuse_reasons
 
+               mask_docs = False
+
                if show_missing_use:
                        print("\nemerge: there are no ebuilds built with USE flags to satisfy "+green(xinfo)+".")
                        print("!!! One of the following packages is required to complete your request:")
@@ -2216,7 +2221,7 @@ class depgraph(object):
                                for line in wrap(msg, 75):
                                        print(line)
                        print()
-                       show_mask_docs()
+                       mask_docs = True
                else:
                        print("\nemerge: there are no ebuilds to satisfy "+green(xinfo)+".")
 
@@ -2251,6 +2256,10 @@ class depgraph(object):
 
                print()
 
+               if mask_docs:
+                       show_mask_docs()
+                       print()
+
        def _iter_match_pkgs(self, root_config, pkg_type, atom, onlydeps=False):
                """
                Iterate over Package instances of pkg_type matching the given atom.
index 422442fb470e5430ce3ef6561ab051a8d8e3aa4a..82f0666c8a11ab222da555c9398c8d4e163b5d7b 100644 (file)
@@ -497,6 +497,12 @@ def help(myopts, havecolor=1):
                print("              Effects vary, but the general outcome is a reduced or condensed")
                print("              output from portage's displays.")
                print()
+               print("       "+green("--quiet-build"))
+               desc = "Redirect all build output to logs alone, and do not " + \
+                       "display it on stdout."
+               for line in wrap(desc, desc_width):
+                       print(desc_indent + line)
+               print()
                print("       "+green("--reinstall ") + turquoise("changed-use"))
                print("              Tells emerge to include installed packages where USE flags have")
                print("              changed since installation.  Unlike --newuse, this option does")
index b73dc09001018267adb726440f65115efa7ca309..461b7060fd6624b2cb5051dea6323a98a7218074 100644 (file)
@@ -64,7 +64,9 @@ options=[
 "--nodeps",       "--noreplace",
 "--nospinner",    "--oneshot",
 "--onlydeps",     "--pretend",
-"--quiet",        "--resume",
+"--quiet",
+"--quiet-build",
+"--resume",
 "--searchdesc",
 "--skipfirst",
 "--tree",