Bug #186842 - Suppress file merge display, as previously done in --quiet mode, whenever
authorZac Medico <zmedico@gentoo.org>
Tue, 21 Oct 2008 08:39:00 +0000 (08:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 21 Oct 2008 08:39:00 +0000 (08:39 -0000)
--verbose is not enabled. Also, export PORTAGE_VERBOSE to the ebuild environment and use
it to control tar verbosity when creating binary packages.

svn path=/main/trunk/; revision=11709

bin/misc-functions.sh
pym/_emerge/__init__.py
pym/portage/__init__.py
pym/portage/dbapi/vartree.py

index ebd1d8fe68b51c4ff56a0a0d40708c1bd80e116f..f2e41bed8f37d514f0c02801b1f32b522e77520c 100755 (executable)
@@ -629,7 +629,7 @@ dyn_package() {
        cd "${T}"
        install_mask "${PORTAGE_BUILDDIR}/image" "${PKG_INSTALL_MASK}"
        local tar_options=""
-       [ "${PORTAGE_QUIET}" == "1" ] ||  tar_options="${tar_options} -v"
+       [[ $PORTAGE_VERBOSE = 1 ]] && tar_options+=" -v"
        # Sandbox is disabled in case the user wants to use a symlink
        # for $PKGDIR and/or $PKGDIR/All.
        export SANDBOX_ON="0"
index 0cca793d52740aa6a897312b04363c7c95d10dc1..43b4fb1b9053c50037000e470d5e00abfd5e5985 100644 (file)
@@ -13439,6 +13439,10 @@ def adjust_config(myopts, settings):
                settings["PORTAGE_QUIET"]="1"
                settings.backup_changes("PORTAGE_QUIET")
 
+       if "--verbose" in myopts:
+               settings["PORTAGE_VERBOSE"] = "1"
+               settings.backup_changes("PORTAGE_VERBOSE")
+
        # Set so that configs will be merged regardless of remembered status
        if ("--noconfmem" in myopts):
                settings["NOCONFMEM"]="1"
index b780c4033edcfa4acc77491361d5abc890d209cf..162ff7e0fb6b575ad1da0ec957c9b481999c2b2a 100644 (file)
@@ -939,7 +939,8 @@ class config(object):
                "PORTAGE_LOG_FILE", "PORTAGE_MASTER_PID",
                "PORTAGE_PYM_PATH", "PORTAGE_QUIET",
                "PORTAGE_REPO_NAME", "PORTAGE_RESTRICT",
-               "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV", "PORTAGE_WORKDIR_MODE",
+               "PORTAGE_TMPDIR", "PORTAGE_UPDATE_ENV",
+               "PORTAGE_VERBOSE", "PORTAGE_WORKDIR_MODE",
                "PORTDIR", "PORTDIR_OVERLAY", "PREROOTPATH", "PROFILE_PATHS",
                "ROOT", "ROOTPATH", "STARTDIR", "T", "TMP", "TMPDIR",
                "USE_EXPAND", "USE_ORDER", "WORKDIR",
index eae494ada15ded96ac4865474c0dc99510ab34d4..85bce610ee8bd22afcf0e5b943868ecca7df1c2d 100644 (file)
@@ -1671,8 +1671,7 @@ class dblink(object):
                self._lock_vdb = None
 
                self.settings = mysettings
-               if self.settings == 1:
-                       raise ValueError
+               self._verbose = self.settings.get("PORTAGE_VERBOSE") == "1"
 
                self.myroot=myroot
                protect_obj = ConfigProtect(myroot,
@@ -2106,6 +2105,8 @@ class dblink(object):
                return os.EX_OK
 
        def _display_merge(self, msg, level=0, noiselevel=0):
+               if not self._verbose and noiselevel >= 0 and level < logging.WARN:
+                       return
                if self._scheduler is not None:
                        self._scheduler.dblinkDisplayMerge(self, msg,
                                level=level, noiselevel=noiselevel)