"virtual.versioned":"PROVIDE contains virtuals with versions",
"virtual.exists":"PROVIDE contains existing package names",
"virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
- "usage.obsolete":"The ebuild makes use of an obsolete construct"
+ "usage.obsolete":"The ebuild makes use of an obsolete construct",
+ "upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
}
qacats = qahelp.keys()
"virtual.exists",
"virtual.unavailable",
"usage.obsolete",
+"upstream.workaround",
"LIVEVCS.stable"
))
.B metadata.missing
Missing metadata.xml files
.TP
+.B upstream.workaround
+The ebuild works around an upstream bug, an upstream bug should be filed and
+tracked in bugs.gentoo.org
+.TP
.B usage.obsolete
The ebuild makes use of an obsolete construct
.TP
self._modified.add(cpv)
def __iter__(self):
+ if self._cache_data is None:
+ # triggered by python-trace
+ return iter([])
return iter(self._cache_data["blockers"])
def __delitem__(self, cpv):
spinner.update = spinner.update_scroll
if "--quiet" not in myopts:
- portage.deprecated_profile_check()
+ portage.deprecated_profile_check(settings=settings)
repo_name_check(trees)
config_protect_check(trees)
level=logging.ERROR, noiselevel=-1)
have_builddir = "PORTAGE_BUILDDIR" in mysettings and \
os.path.isdir(mysettings["PORTAGE_BUILDDIR"])
+
+ global_tmpdir = mysettings["PORTAGE_TMPDIR"]
+ private_tmpdir = None
+ if not parallel_fetchonly and not have_builddir:
+ # When called by digestgen(), it's normal that
+ # PORTAGE_BUILDDIR doesn't exist. It's helpful
+ # to show the pkg_nofetch output though, so go
+ # ahead and create a temporary PORTAGE_BUILDDIR.
+ # Use a temporary config instance to avoid altering
+ # the state of the one that's been passed in.
+ mysettings = config(clone=mysettings)
+ from tempfile import mkdtemp
+ try:
+ private_tmpdir = mkdtemp("", "._portage_fetch_.",
+ global_tmpdir)
+ except OSError, e:
+ if e.errno != portage.exception.PermissionDenied.errno:
+ raise
+ raise portage.exception.PermissionDenied(global_tmpdir)
+ mysettings["PORTAGE_TMPDIR"] = private_tmpdir
+ mysettings.backup_changes("PORTAGE_TMPDIR")
+ debug = mysettings.get("PORTAGE_DEBUG") == "1"
+ portage.doebuild_environment(mysettings["EBUILD"], "fetch",
+ mysettings["ROOT"], mysettings, debug, 1, None)
+ prepare_build_dirs(mysettings["ROOT"], mysettings, 0)
+ have_builddir = True
+
if not parallel_fetchonly and have_builddir:
# To spawn pkg_nofetch requires PORTAGE_BUILDDIR for
# ensuring sane $PWD (bug #239560) and storing elog
mysettings.pop("EBUILD_PHASE", None)
else:
mysettings["EBUILD_PHASE"] = ebuild_phase
+ if private_tmpdir is not None:
+ shutil.rmtree(private_tmpdir)
elif restrict_fetch:
pass
raise
del e
-def deprecated_profile_check():
- if not os.access(DEPRECATED_PROFILE_FILE, os.R_OK):
+def deprecated_profile_check(settings=None):
+ config_root = "/"
+ if settings is not None:
+ config_root = settings["PORTAGE_CONFIGROOT"]
+ deprecated_profile_file = os.path.join(config_root,
+ DEPRECATED_PROFILE_FILE.lstrip(os.sep))
+ if not os.access(deprecated_profile_file, os.R_OK):
return False
- deprecatedfile = open(DEPRECATED_PROFILE_FILE, "r")
+ deprecatedfile = open(deprecated_profile_file, "r")
dcontent = deprecatedfile.readlines()
deprecatedfile.close()
writemsg(red("\n!!! Your current profile is deprecated and not supported anymore.\n"),
# Distributed under the terms of the GNU General Public License v2
# $Id$
+__all__ = ["lockdir", "unlockdir", "lockfile", "unlockfile", \
+ "hardlock_name", "hardlink_is_mine", "hardlink_lockfile", \
+ "unhardlink_lockfile", "hardlock_cleanup"]
import errno, os, stat, time, types
from portage.exception import DirectoryNotFound, FileNotFound, \
pass
elif waiting_msg is None:
if isinstance(mypath, int):
- print "waiting for lock on fd %i" % myfd
+ writemsg("waiting for lock on fd %i\n" % myfd,
+ noiselevel=-1)
else:
- print "waiting for lock on %s" % lockfilename
+ writemsg("waiting for lock on %s\n" % lockfilename,
+ noiselevel=-1)
elif waiting_msg:
- print waiting_msg
+ writemsg(waiting_msg + "\n", noiselevel=-1)
# try for the exclusive lock now.
fcntl.lockf(myfd,fcntl.LOCK_EX)
elif e.errno == errno.ENOLCK:
if hardlink_is_mine(myhardlock, lockfilename):
# We have the lock.
if reported_waiting:
- print
+ writemsg("\n", noiselevel=-1)
return True
if reported_waiting:
- writemsg(".")
+ writemsg(".", noiselevel=-1)
else:
reported_waiting = True
from portage.const import PORTAGE_BIN_PATH
- print
- print "Waiting on (hardlink) lockfile: (one '.' per 3 seconds)"
- print "This is a feature to prevent distfiles corruption."
- print "%s/clean_locks can fix stuck locks." % PORTAGE_BIN_PATH
- print "Lockfile: " + lockfilename
+ msg = "\nWaiting on (hardlink) lockfile:" + \
+ " (one '.' per 3 seconds)\n" + \
+ "%s/clean_locks can fix stuck locks.\n" % PORTAGE_BIN_PATH + \
+ "Lockfile: %s\n" % lockfilename
+ writemsg(msg, noiselevel=-1)
time.sleep(3)
os.unlink(myhardlock)
class EMakeParallelDisabled(LineCheck):
"""Check for emake -j1 calls which disable parallelization."""
- repoman_check_name = 'ebuild.minorsyn'
+ repoman_check_name = 'upstream.workaround'
re = re.compile(r'^\s*emake\s+-j\s*1\s')
error = errors.EMAKE_PARALLEL_DISABLED
NESTED_DIE_ERROR = 'Ebuild calls die in a subshell on line: %d'
PATCHES_ERROR = 'PATCHES is not a bash array on line: %d'
REDUNDANT_CD_S_ERROR = 'Ebuild has redundant cd ${S} statement on line: %d'
-EMAKE_PARALLEL_DISABLED = 'Ebuild calls emake -j1 on line: %d'
+EMAKE_PARALLEL_DISABLED = 'Upstream parallel compilation bug (ebuild calls emake -j1 on line: %d)'
DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'