return 1
# Reload the whole config from scratch.
+ portage._sync_disabled_warnings = False
settings, trees, mtimedb = load_emerge_config(trees=trees)
adjust_configs(myopts, trees)
root_config = trees[settings['EROOT']]['root_config']
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
+ if myaction == "sync":
+ portage._sync_disabled_warnings = True
settings, trees, mtimedb = load_emerge_config()
portdb = trees[settings['EROOT']]['porttree'].dbapi
rval = profile_check(trees, myaction)
_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
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 = []
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)
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
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