summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-10-14 03:33:38 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-10-14 03:33:38 +0200
commitb7b906fdf49a55621a12798ae21d603d9ca4eb76 (patch)
tree2cd0a66bf5a8c5cb3363a77defb807c1dd0dcb58 /pym/portage
parent58c2ef4e37fa635945e19a1650e15206d457830b (diff)
downloadportage-b7b906fdf49a55621a12798ae21d603d9ca4eb76.tar.gz
portage-b7b906fdf49a55621a12798ae21d603d9ca4eb76.tar.bz2
portage-b7b906fdf49a55621a12798ae21d603d9ca4eb76.zip
Bug #434970: Disable some warnings during `emerge --sync`.
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/__init__.py2
-rw-r--r--pym/portage/package/ebuild/_config/LocationsManager.py6
-rw-r--r--pym/portage/repository/config.py8
3 files changed, 10 insertions, 6 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 695f1ea0a..9119b25bb 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -328,6 +328,8 @@ _python_interpreter = os.path.realpath(sys.executable)
_bin_path = PORTAGE_BIN_PATH
_pym_path = PORTAGE_PYM_PATH
+_sync_disabled_warnings = False
+
def _shell_quote(s):
"""
Quote a string in double-quotes and use backslashes to
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
index c3099d73f..1ca2b324d 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -100,9 +100,9 @@ class LocationsManager(object):
self._addProfile(os.path.realpath(self.profile_path),
repositories, known_repos)
except ParseError as e:
- writemsg(_("!!! Unable to parse profile: '%s'\n") % \
- self.profile_path, noiselevel=-1)
- writemsg("!!! ParseError: %s\n" % str(e), noiselevel=-1)
+ if not portage._sync_disabled_warnings:
+ writemsg(_("!!! Unable to parse profile: '%s'\n") % self.profile_path, noiselevel=-1)
+ writemsg("!!! ParseError: %s\n" % str(e), noiselevel=-1)
self.profiles = []
self.profiles_complex = []
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 83018b8a6..71f548ca4 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -15,6 +15,7 @@ try:
from configparser import SafeConfigParser
except ImportError:
from ConfigParser import SafeConfigParser, ParsingError
+import portage
from portage import eclass_cache, os
from portage.const import (MANIFEST2_HASH_FUNCTIONS, MANIFEST2_REQUIRED_HASH,
REPO_NAME_LOC, USER_CONFIG_PATH)
@@ -396,8 +397,8 @@ class RepoConfigLoader(object):
prepos[repo.name] = repo
else:
- writemsg(_("!!! Invalid PORTDIR_OVERLAY"
- " (not a dir): '%s'\n") % ov, noiselevel=-1)
+ if not portage._sync_disabled_warnings:
+ writemsg(_("!!! Invalid PORTDIR_OVERLAY (not a dir): '%s'\n") % ov, noiselevel=-1)
return portdir
@@ -521,7 +522,8 @@ class RepoConfigLoader(object):
prepos['DEFAULT'].main_repo = ignored_location_map[portdir]
else:
prepos['DEFAULT'].main_repo = None
- writemsg(_("!!! main-repo not set in DEFAULT and PORTDIR is empty. \n"), noiselevel=-1)
+ if not portage._sync_disabled_warnings:
+ writemsg(_("!!! main-repo not set in DEFAULT and PORTDIR is empty.\n"), noiselevel=-1)
self.prepos = prepos
self.prepos_order = prepos_order