Rename portage._sync_disabled_warnings to portage._sync_mode.
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 9bb4774..c401d39 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function, unicode_literals
@@ -2073,7 +2073,7 @@
return returncode
# Reload the whole config from scratch.
- portage._sync_disabled_warnings = False
+ portage._sync_mode = False
load_emerge_config(emerge_config=emerge_config)
adjust_configs(emerge_config.opts, emerge_config.trees)
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 89413a9..da223a6 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
@@ -1011,7 +1011,7 @@
# Portage needs to ensure a sane umask for the files it creates.
os.umask(0o22)
if myaction == "sync":
- portage._sync_disabled_warnings = True
+ portage._sync_mode = True
emerge_config = load_emerge_config(
action=myaction, args=myfiles, opts=myopts)
rval = profile_check(emerge_config.trees, emerge_config.action)
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 75d0d64..4c0d9ca 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1,5 +1,4 @@
-# portage.py -- core Portage functionality
-# Copyright 1998-2013 Gentoo Foundation
+# Copyright 1998-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
@@ -373,7 +372,7 @@
# Api consumers included in portage should set this to True.
_internal_caller = False
-_sync_disabled_warnings = False
+_sync_mode = False
def _get_stdin():
"""
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
index 80b6a70..4427f1d 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
@@ -119,7 +119,7 @@
self._addProfile(os.path.realpath(self.profile_path),
repositories, known_repos)
except ParseError as e:
- if not portage._sync_disabled_warnings:
+ if not portage._sync_mode:
writemsg(_("!!! Unable to parse profile: '%s'\n") % self.profile_path, noiselevel=-1)
writemsg("!!! ParseError: %s\n" % str(e), noiselevel=-1)
self.profiles = []
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 92e6c3f..f5ef982 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2013 Gentoo Foundation
+# Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
@@ -536,7 +536,7 @@
if portdir_overlay:
for ov in portdir_overlay:
ov = normalize_path(ov)
- if isdir_raise_eaccess(ov) or portage._sync_disabled_warnings:
+ if isdir_raise_eaccess(ov) or portage._sync_mode:
new_ov.append(portage._shell_quote(ov))
else:
writemsg(_("!!! Invalid PORTDIR_OVERLAY"
@@ -1040,7 +1040,7 @@
else:
profile_broken = True
- if profile_broken and not portage._sync_disabled_warnings:
+ if profile_broken and not portage._sync_mode:
abs_profile_path = None
for x in (PROFILE_PATH, 'etc/make.profile'):
x = os.path.join(self["PORTAGE_CONFIGROOT"], x)
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index b7ee34f..f89f098 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -169,7 +169,7 @@
location = repo_opts.get('location')
self.user_location = location
if location is not None and location.strip():
- if os.path.isdir(location) or portage._sync_disabled_warnings:
+ if os.path.isdir(location) or portage._sync_mode:
location = os.path.realpath(location)
else:
location = None
@@ -187,7 +187,7 @@
# is empty (bug #484950).
if name is not None:
self.name = name
- if portage._sync_disabled_warnings:
+ if portage._sync_mode:
missing = False
elif name == "DEFAULT":
@@ -493,7 +493,7 @@
prepos[repo.name] = repo
else:
- if not portage._sync_disabled_warnings:
+ if not portage._sync_mode:
writemsg(_("!!! Invalid PORTDIR_OVERLAY (not a dir): '%s'\n") % ov, noiselevel=-1)
return portdir
@@ -647,7 +647,7 @@
del prepos[repo_name]
continue
else:
- if not portage._sync_disabled_warnings:
+ if not portage._sync_mode:
if not isdir_raise_eaccess(repo.location):
writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has location attribute set "
"to nonexistent directory: '%s'") %
@@ -713,7 +713,7 @@
prepos['DEFAULT'].main_repo = main_repo
else:
prepos['DEFAULT'].main_repo = None
- if portdir and not portage._sync_disabled_warnings:
+ if portdir and not portage._sync_mode:
writemsg(_("!!! main-repo not set in DEFAULT and PORTDIR is empty.\n"), noiselevel=-1)
if main_repo is not None and prepos[main_repo].priority is None:
@@ -826,7 +826,7 @@
continue
if repo._masters_orig is None and self.mainRepo() and \
- repo.name != self.mainRepo().name and not portage._sync_disabled_warnings:
+ repo.name != self.mainRepo().name and not portage._sync_mode:
# TODO: Delete masters code in pym/portage/tests/resolver/ResolverPlayground.py when deleting this warning.
writemsg_level("!!! %s\n" % _("Repository '%s' is missing masters attribute in '%s'") %
(repo.name, os.path.join(repo.location, "metadata", "layout.conf")) +
@@ -880,7 +880,7 @@
if r.location is None:
writemsg(_("!!! Location not set for repository %s\n") % name, noiselevel=-1)
else:
- if not isdir_raise_eaccess(r.location) and not portage._sync_disabled_warnings:
+ if not isdir_raise_eaccess(r.location) and not portage._sync_mode:
self.prepos_order.remove(name)
writemsg(_("!!! Invalid Repository Location"
" (not a dir): '%s'\n") % r.location, noiselevel=-1)