# forcibly break all hard links as some compressors whine about it
find "${dir}" -type f -links +1 -exec env file="{}" sh -c \
- 'cp -p "${file}"{,.ecompress.break} ; mv -f "${file}"{.ecompress.break,}' \;
+ 'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \;
# now lets do our work
[[ -z ${suffix} ]] && continue
OBJCOPY=${OBJCOPY:-${CHOST}-objcopy}
type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
-export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS:---strip-unneeded}
+# We'll leave out -R .note for now until we can check out the relevance
+# of the section when it has the ALLOC flag set on it ...
+export SAFE_STRIP_FLAGS="--strip-unneeded"
+export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
banner=1
vecho " ${x:${#ED}}"
[[ -n ${NOSTRIP} ]] && continue
[[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}"
- fi
- if [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
+ elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* || ${f} == *"SB relocatable"* ]] ; then
vecho " ${x:${#ED}}"
save_elf_debug "${x}"
[[ -n ${NOSTRIP} ]] && continue
- [[ ${stripitbaby} -eq 1 ]] && ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
+ if [[ ${stripitbaby} -eq 1 ]] ; then
+ [[ ${f} == *"SB relocatable"* ]] \
+ && ${STRIP} ${SAFE_STRIP_FLAGS} "${x}" \
+ || ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
+ fi
fi
done
# Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems)
# that last one is tricky because multiple profiles need to be checked.
-import errno, os, shutil, sys
+import errno
+import os
+import shutil
+import sys
+import signal
+import re
+import tempfile
+
+try:
+ import cPickle as pickle
+except ImportError:
+ import pickle
+
if not hasattr(__builtins__, "set"):
from sets import Set as set
+
exename=os.path.basename(sys.argv[0])
version="1.2"
map(allowed_filename_chars_set.setdefault, map(chr, range(ord('0'), ord('9')+1)))
map(allowed_filename_chars_set.setdefault, map(chr, map(ord, [".", "-", "_", "+", ":"])))
-import signal,re,pickle,tempfile
-
os.environ["PORTAGE_LEGACY_GLOBALS"] = "false"
try:
import portage
#for x in myaux[allvars.index("RESTRICT")].split():
# if x.startswith("no"):
# print "Bad RESTRICT value: %s" % x
-
- myaux["PROVIDE"] = portage.dep.use_reduce(portage.dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
+ try:
+ myaux["PROVIDE"] = portage.dep.use_reduce(
+ portage.dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
+ except portage.exception.InvalidDependString, e:
+ stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
+ fails["PROVIDE.syntax"].append(mykey+".ebuild PROVIDE: "+str(e))
+ del e
+ continue
myaux["PROVIDE"] = " ".join(portage.flatten(myaux["PROVIDE"]))
for myprovide in myaux["PROVIDE"].split():
prov_cp = portage.dep_getkey(myprovide)
.TP
.B installsources
Install source code into /usr/src/debug/${CATEGORY}/${PF} (also see
-\fBsplitdebug\fR). This feature works only if debugedit is installed.
+\fBsplitdebug\fR). This feature works only if debugedit is installed and CFLAGS
+is set to include debug information (such as with the \-ggdb flag).
.TP
.B keeptemp
Do not delete the ${T} directory after the merge process.
if p_status == "merge":
# Update old-style virtuals if this package provides any.
# These are needed for dep_virtual calls inside dep_check.
- self.pkgsettings[p_root].setinst(p_key,
- self.trees[p_root][self.pkg_tree_map[p_type]].dbapi)
+ p_db = self.trees[p_root][self.pkg_tree_map[p_type]].dbapi
+ try:
+ self.pkgsettings[p_root].setinst(p_key, p_db)
+ except portage.exception.InvalidDependString, e:
+ provide = p_db.aux_get(p_key, ["PROVIDE"])[0]
+ show_invalid_depstring_notice(myparent, provide, str(e))
+ del e
+ return 0
if "--debug" in self.myopts:
print "Candidates:",mymerge
show_blocker_docs_link()
return 1
+ if "--resume" in self.myopts:
+ # We're resuming.
+ print colorize("GOOD", "*** Resuming merge...")
+ emergelog(xterm_titles, " *** Resuming merge...")
+ mylist = mtimedb["resume"]["mergelist"][:]
+ if "--skipfirst" in self.myopts and mylist:
+ del mtimedb["resume"]["mergelist"][0]
+ del mylist[0]
+ mtimedb.commit()
+ validate_merge_list(self.trees, mylist)
+ mymergelist = mylist
+
# Verify all the manifests now so that the user is notified of failure
# as soon as possible.
if "--fetchonly" not in self.myopts and \
#buildsyspkg: I need mysysdict also on resume (moved from the else block)
mysysdict = genericdict(getlist(self.settings, "system"))
- if "--resume" in self.myopts:
- # We're resuming.
- print colorize("GOOD", "*** Resuming merge...")
- emergelog(xterm_titles, " *** Resuming merge...")
- mymergelist=mtimedb["resume"]["mergelist"][:]
- if "--skipfirst" in self.myopts and mymergelist:
- del mtimedb["resume"]["mergelist"][0]
- del mymergelist[0]
- mtimedb.commit()
- validate_merge_list(self.trees, mymergelist)
- else:
+ if "--resume" not in self.myopts:
myfavs = portage.grabfile(
os.path.join(self.target_root, portage.WORLD_FILE))
myfavdict=genericdict(myfavs)
dead_nodes = None
break
for x in mynodes:
- mymatches = portdb.xmatch("match-all",x)
+ mymatches = portdb.cp_list(x)
portage.writemsg_stdout("processing %s\n" % x)
for y in mymatches:
try:
"basedir_var":"DISTCC_DIR",
"default_dir":os.path.join(mysettings["BUILD_PREFIX"], ".distcc"),
"subdirs":("lock", "state"),
- "always_recurse":False}
+ "always_recurse":True}
}
dirmode = 02070
filemode = 060
set(["clean", "cleanrm", "help", "prerm", "postrm"])
mycpv = mysettings["CATEGORY"] + "/" + mysettings["PF"]
dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"]
- metadata = dict(izip(dep_keys, mydbapi.aux_get(mycpv, dep_keys)))
+ misc_keys = ["LICENSE", "PROVIDE", "RESTRICT", "SRC_URI"]
+ all_keys = dep_keys + misc_keys
+ metadata = dict(izip(all_keys, mydbapi.aux_get(mycpv, all_keys)))
class FakeTree(object):
def __init__(self, mydb):
self.dbapi = mydb
if mydo not in invalid_dep_exempt_phases:
return 1
del dep_type, mycheck
- del mycpv, dep_keys, metadata, FakeTree, dep_check_trees
+ for k in misc_keys:
+ try:
+ portage.dep.use_reduce(
+ portage.dep.paren_reduce(metadata[k]), matchall=True)
+ except portage.exception.InvalidDependString, e:
+ writemsg("%s: %s\n%s\n" % (
+ k, metadata[k], str(e)), noiselevel=-1)
+ del e
+ if mydo not in invalid_dep_exempt_phases:
+ return 1
+ del k
+ del mycpv, dep_keys, metadata, misc_keys, FakeTree, dep_check_trees
if "PORTAGE_TMPDIR" not in mysettings or \
not os.path.isdir(mysettings["PORTAGE_TMPDIR"]):
os.mkdir(edpath)
apply_secpass_permissions(edpath, uid=portage_uid, mode=0755)
try:
- for file in aalist:
+ for file in alist:
os.symlink(os.path.join(orig_distdir, file),
os.path.join(edpath, file))
except OSError:
# d) is the first item
preferred = []
+ preferred_any_slot = []
possible_upgrades = []
other = []
if not vardb.match(atom) and not atom.startswith("virtual/"):
all_installed = False
break
+ all_installed_slots = False
+ if all_installed:
+ all_installed_slots = True
+ for slot_atom in versions:
+ # New-style virtuals have zero cost to install.
+ if not vardb.match(slot_atom) and \
+ not slot_atom.startswith("virtual/"):
+ all_installed_slots = False
+ break
if all_installed:
- preferred.append(this_choice)
+ if all_installed_slots:
+ preferred.append(this_choice)
+ else:
+ preferred_any_slot.append(this_choice)
else:
possible_upgrades.append(this_choice)
else:
# into || ( highest version ... lowest version ). We want to prefer the
# highest all_available version of the new-style virtual when there is a
# lower all_installed version.
+ preferred.extend(preferred_any_slot)
preferred.extend(possible_upgrades)
possible_upgrades = preferred[1:]
for possible_upgrade in possible_upgrades: