atoms in a set will be unmerged even if they are depended upon by other
packages
+portage-2.1.4.1
+==================================
+
+* If you have an overlay then you should remove **/files/digest-*
+ files (Manifest1) because they are no longer supported.
+* If earlier versions of portage will be used to generate manifests
+ for your overlay then you should add a file named manifest1_obsolete
+ to the root of the repository in order to disable generation of the
+ Manifest1 digest files.
+
portage-2.1.4
==================================
cpv = cat + "/" + os.path.basename(myebuild)[:-7]
from portage.manifest import Manifest
mf = Manifest(pkgdir, mysettings["DISTDIR"],
- fetchlist_dict=fetchlist_dict)
+ fetchlist_dict=fetchlist_dict, manifest1_compat=False)
mf.create(requiredDistfiles=None,
assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
distfiles = fetchlist_dict[cpv]
# Turn of extended glob matching so that g++ doesn't get incorrectly matched.
shopt -u extglob
-QA_INTERCEPTORS="javac java-config python python-config perl grep egrep fgrep sed gcc g++ cc bash awk nawk gawk pkg-config"
+if [[ ${EBUILD_PHASE} == depend ]] ; then
+ QA_INTERCEPTORS="awk bash cc egrep fgrep g++
+ gawk gcc grep javac java-config nawk perl
+ pkg-config python python-config sed"
+elif [[ ${EBUILD_PHASE} == clean* ]] ; then
+ unset QA_INTERCEPTORS
+else
+ QA_INTERCEPTORS="autoconf automake aclocal libtoolize"
+fi
# level the QA interceptors if we're in depend
-if hasq "depend" "${EBUILD_SH_ARGS}"; then
+if [[ -n ${QA_INTERCEPTORS} ]] ; then
for BIN in ${QA_INTERCEPTORS}; do
BIN_PATH=$(type -Pf ${BIN})
if [ "$?" != "0" ]; then
else
BODY="${BIN_PATH} \"\$@\"; return \$?"
fi
- FUNC_SRC="${BIN}() {
- if [ \$ECLASS_DEPTH -gt 0 ]; then
- eqawarn \"QA Notice: '${BIN}' called in global scope: eclass \${ECLASS}\"
+ if [[ ${EBUILD_PHASE} == depend ]] ; then
+ FUNC_SRC="${BIN}() {
+ if [ \$ECLASS_DEPTH -gt 0 ]; then
+ eqawarn \"QA Notice: '${BIN}' called in global scope: eclass \${ECLASS}\"
+ else
+ eqawarn \"QA Notice: '${BIN}' called in global scope: \${CATEGORY}/\${PF}\"
+ fi
+ ${BODY}
+ }"
+ elif hasq ${BIN} autoconf automake aclocal libtoolize ; then
+ FUNC_SRC="${BIN}() {
+ if ! hasq \${FUNCNAME[1]} eautoreconf eaclocal _elibtoolize \\
+ eautoheader eautoconf eautomake autotools_run_tool \\
+ autotools_check_macro autotools_get_subdirs \\
+ autotools_get_auxdir ; then
+ eqawarn \"QA Notice: '${BIN}' called by \${FUNCNAME[1]}: \${CATEGORY}/\${PF}\"
+ eqawarn \"Use autotools.eclass instead of calling '${BIN}' directly.\"
+ fi
+ ${BODY}
+ }"
else
- eqawarn \"QA Notice: '${BIN}' called in global scope: \${CATEGORY}/\${PF}\"
+ FUNC_SRC="${BIN}() {
+ eqawarn \"QA Notice: '${BIN}' called by \${FUNCNAME[1]}: \${CATEGORY}/\${PF}\"
+ ${BODY}
+ }"
fi
- ${BODY}
- }";
eval "$FUNC_SRC" || echo "error creating QA interceptor ${BIN}" >&2
done
unset BIN_PATH BIN BODY FUNC_SRC
#a reasonable default for $S
[[ -z ${S} ]] && export S=${WORKDIR}/${P}
-#wipe the interceptors. we don't want saved.
-if hasq "depend" "${EBUILD_SH_ARGS}"; then
- unset -f $QA_INTERCEPTORS
- unset QA_INTERCEPTORS
-fi
-
#some users have $TMP/$TMPDIR to a custom dir in their home ...
#this will cause sandbox errors with some ./configure
#scripts, so set it to $T.
debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \
newpdepend do_newdepend remove_path_entry killparent \
save_ebuild_env filter_readonly_variables preprocess_ebuild_env \
- source_all_bashrcs ebuild_phase ebuild_phase_with_hooks
+ source_all_bashrcs ebuild_phase ebuild_phase_with_hooks \
+ ${QA_INTERCEPTORS}
# portage config variables and variables set directly by portage
unset BAD BRACKET BUILD_PREFIX COLS \
rm -Rf ${root}/${no_inst} >&/dev/null
# we also need to handle globs (*.a, *.h, etc)
- find "${root}" -path ${no_inst} -exec rm -fR {} \; >/dev/null
+ find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null
done
# set everything back the way we found it
set +o noglob
fi
done
- install_mask "${D}" ${INSTALL_MASK}
+ install_mask "${D}" "${INSTALL_MASK}"
# remove share dir if unnessesary
if hasq nodoc $FEATURES -o hasq noman $FEATURES -o hasq noinfo $FEATURES; then
dyn_package() {
cd "${PORTAGE_BUILDDIR}/image"
- install_mask "${PORTAGE_BUILDDIR}/image" ${PKG_INSTALL_MASK}
+ install_mask "${PORTAGE_BUILDDIR}/image" "${PKG_INSTALL_MASK}"
local tar_options=""
[ "${PORTAGE_QUIET}" == "1" ] || tar_options="${tar_options} -v"
# Sandbox is disabled in case the user wants to use a symlink
"ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully",
"ebuild.minorsyn":"This ebuild has a minor syntax error that contravenes gentoo coding style",
"ebuild.badheader":"This ebuild has a malformed header",
- "ebuild.autotools":"Ebuild calls autotools directly instead of using autotools.eclass",
"metadata.missing":"Missing metadata.xml files",
"metadata.bad":"Bad metadata.xml files",
"virtual.versioned":"PROVIDE contains virtuals with versions",
"ebuild.notadded",
"ebuild.nostable",
"ebuild.allmasked",
-"ebuild.autotools",
"ebuild.nesteddie",
"desktop.invalid",
"digest.assumed",
logging.fatal("Couldn't read KEYWORDS from arch.list")
sys.exit(1)
-manifest1_compat = not os.path.exists(
- os.path.join(portdir, "manifest1_obsolete"))
+manifest1_compat = False
if portdir_overlay != portdir:
kwlist.update(portage.grabfile(
os.path.join(portdir_overlay, "profiles", "arch.list")))
- manifest1_compat = not os.path.exists(
- os.path.join(portdir_overlay, "manifest1_obsolete"))
scanlist = utilities.FindPackagesToScan(repoman_settings, startdir, reposplit)
scanlist.sort()
if options.force:
commitmessage += ", RepoMan options: --force"
commitmessage += ")"
- if not manifest1_compat:
- myfiles = myupdates + myremoved + mymanifests
- filesdirs = set()
- if repolevel == 3:
- filesdirs.add(os.path.join(".", "files"))
- elif repolevel in (1, 2):
- for x in myfiles:
- xs = x.split(os.path.sep)
- if len(xs) < 4-repolevel:
- continue
- xs = xs[0:4-repolevel]
- xs.append("files")
- filesdirs.add(os.path.join(*xs))
- else:
- raise AssertionError("repolevel=%s" % str(repolevel))
- digest_files = []
- for x in filesdirs:
- dir_path = os.path.join(startdir, x)
- if not os.path.isdir(dir_path):
- continue
- for y in os.listdir(dir_path):
- if y.startswith("digest-"):
- digest_files.append(os.path.join(x, y))
- if digest_files:
- digest_files.sort()
- if options.pretend:
- if vcs == "cvs":
- print "(rm %s)" % " ".join(digest_files)
- print "(cvs remove %s)" % " ".join(digest_files)
- elif vcs == "svn":
- print "(svn remove %s)" % " ".join(digest_files)
- else:
- if vcs == "cvs":
- for x in digest_files:
- os.unlink(os.path.join(startdir, x))
- retval = spawn(["cvs", "remove"] + digest_files,
- env=os.environ)
- elif vcs == "svn":
- retval = spawn(["svn", "remove"] + digest_files,
- env=os.environ)
- if retval != os.EX_OK:
- print "!!! Exiting on vcs (shell) error code:",retval
- sys.exit(retval)
- myremoved.extend(digest_files)
- myremoved = list(set(myremoved))
- myremoved.sort()
if myupdates or myremoved:
myfiles = myupdates + myremoved
# Number of seconds rsync will wait before timing out.
#RSYNC_TIMEOUT="180"
-PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
+PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
# Minimal CONFIG_PROTECT
CONFIG_PROTECT="/etc"
"--exclude=/distfiles", # Exclude distfiles from consideration
"--exclude=/local", # Exclude local from consideration
"--exclude=/packages", # Exclude packages from consideration
- "--filter=H_**/files/digest-*", # Exclude manifest1 digests and delete on the receiving side
])
else:
del e
return 0
mytree = os.path.dirname(os.path.dirname(mysettings["O"]))
- manifest1_compat = not os.path.exists(
- os.path.join(mytree, "manifest1_obsolete"))
+ manifest1_compat = False
mf = Manifest(mysettings["O"], mysettings["DISTDIR"],
fetchlist_dict=fetchlist_dict, manifest1_compat=manifest1_compat)
# Don't require all hashes since that can trigger excessive
import portage.xpak, portage.getbinpkg
import os, errno, stat
+import re
from itertools import izip
class bindbapi(fakedbapi):
except portage.exception.InvalidDependString:
writemsg("!!! Invalid binary package: '%s'\n" % \
self.getname(mycpv), noiselevel=-1)
- self.dbapi.cpv_remove(cpv)
+ self.dbapi.cpv_remove(mycpv)
del pkg_paths[mycpv]
# record location if it's non-default
except (ValueError, KeyError):
chunk_size = 3000
writemsg_stdout("\n")
- writemsg_stdout(green("Fetching bininfo from ")+base_url+"\n")
+ writemsg_stdout(
+ green("Fetching bininfo from ") + \
+ re.sub(r'//(.+):.+@(.+)/', r'//\1:*password*@\2/', base_url) + "\n")
self.remotepkgs = portage.getbinpkg.dir_get_metadata(
self.settings["PORTAGE_BINHOST"], chunk_size=chunk_size)
#writemsg(green(" -- DONE!\n\n"))
"""this tree will scan a portage directory located at root (passed to init)"""
portdbapi_instances = []
_non_category_dirs = ["distfiles", "eclass", "licenses",
- "metadata", "packages", "profiles", "scripts"]
+ "local", "metadata", "packages", "profiles", "scripts"]
_non_category_dirs = re.compile(r'^(%s)$' % "|".join(_non_category_dirs))
def __init__(self, porttree_root, mysettings=None):
portdbapi.portdbapi_instances.append(self)
class Manifest(object):
parsers = (parseManifest2, parseManifest1)
def __init__(self, pkgdir, distdir, fetchlist_dict=None,
- manifest1_compat=True, from_scratch=False):
+ manifest1_compat=False, from_scratch=False):
""" create new Manifest instance for package in pkgdir
and add compability entries for old portage versions if manifest1_compat == True.
Do not parse Manifest file if from_scratch == True (only for internal use)
self.check_next_line = True
-class Autotools(LineCheck):
- """Check for direct calls to autotools"""
- repoman_check_name = 'ebuild.autotools'
- re = re.compile(r'^[^#]*([^e]|^)(autoconf|automake|aclocal|libtoolize)')
-
- def check(self, num, line):
- """Run the check on line and return error if there is one"""
- autotools_match = self.re.match(line)
- if autotools_match is not None:
- return ("Direct calls to '%s'" % autotools_match.group(2)) + \
- " instead of using autotools.eclass on line: %d"
-
-
class EbuildQuotedA(LineCheck):
"""Ensure ebuilds have no quoting around ${A}"""
if match:
return "Quoted \"${A}\" on line: %d"
-_constant_checks = tuple((c() for c in (Autotools,
+_constant_checks = tuple((c() for c in (
EbuildWhitespace, EbuildQuote,
EbuildAssignment, EbuildUselessDodoc,
EbuildUselessCdS, EbuildNestedDie, EbuildQuotedA)))