From: Zac Medico Date: Tue, 21 Oct 2008 08:39:00 +0000 (-0000) Subject: Bug #186842 - Suppress file merge display, as previously done in --quiet mode, whenever X-Git-Tag: v2.2_rc13~73 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=507bcbec012f81d79f8b5131a72c1e3f05edf4f1;p=portage.git Bug #186842 - Suppress file merge display, as previously done in --quiet mode, whenever --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 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index ebd1d8fe6..f2e41bed8 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -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" diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 0cca793d5..43b4fb1b9 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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" diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index b780c4033..162ff7e0f 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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", diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index eae494ada..85bce610e 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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)