#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id: /var/cvsroot/gentoo-src/portage/bin/dohard,v 1.6 2004/10/04 13:56:50 vapier Exp $
+# $Id: $
if [[ $# -ne 2 ]] ; then
echo "$0: two arguments needed" 1>&2
exit 1
fi
-target=$1
-linkname=$2
-exec ln -f "${ED}${target}" "${ED}${linkname}"
+destdir=${2%/*}
+[[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
+
+exec ln -f "${ED}$1" "${ED}$2"
vecho "${0##*/}: ${dir#${ED}} does not exist!"
continue
fi
+ cd "${dir}"
+ actual_dir=${dir}
+ dir=. # use relative path to avoid 'Argument list too long' errors
# hide all the stuff we want to skip
hide_skip_dirs "${dir}"
# now lets do our work
[[ -z ${suffix} ]] && continue
- vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}"
+ vecho "${0##*/}: $(ecompress --bin) ${actual_dir#${D}}"
funk_up_dir "compress" "${suffix}" "ecompress"
# finally, restore the skipped stuff
cd "${ED}" || die "cd failed"
prepall
- declare -i UNSAFE=0
- for i in $(find "${ED}/" -type f -perm -2002); do
- ((UNSAFE++))
- vecho "UNSAFE SetGID: $i"
- chmod -s,o-w "$i"
- done
- for i in $(find "${ED}/" -type f -perm -4002); do
- ((UNSAFE++))
- vecho "UNSAFE SetUID: $i"
- chmod -s,o-w "$i"
- done
-
# Now we look for all world writable files.
for i in $(find "${ED}/" -type f -perm -2); do
vecho -ne '\a'
PORTAGE_QUIET=${tmp_quiet}
fi
- if [[ ${UNSAFE} > 0 ]] ; then
- die "There are ${UNSAFE} unsafe files. Portage will not install them."
+ local unsafe_files=$(find "${ED}" -type f '(' -perm -2002 -o -perm -4002 ')')
+ if [[ -n ${unsafe_files} ]] ; then
+ eqawarn "QA Notice: Unsafe files detected (set*id and world writable)"
+ eqawarn "${unsafe_files}"
+ die "Unsafe files found in \${ED}. Portage will not install them."
fi
if [[ -d ${ED}/${D} ]] ; then
.TP
.B Atom Versions
It is nice to be more specific and say that only certain versions of atoms are
-acceptable. Note that versions must be combined with a prefix (see below). Hence
-you may add a version number as a postfix to the base:
+acceptable. Note that versions must be combined with a prefix (see below).
+Hence you may add a version number as a postfix to the base:
.nf
sys\-apps/sed\fI\-4.0.5\fR
.fi
Versions are normally made up of two or three numbers separated by periods, such
-as 1.2 or 4.5.2. This string may be followed by a character such as 1.2a or 4.5.2z.
-Note that this letter is \fBnot\fR meant to indicate alpha, beta, etc... status.
-For that, use the optional suffix; either _alpha, _beta, _pre (pre\-release), _rc
-(release candidate), or _p (patch). This means for the 3rd pre\-release of a package,
-you would use something like 1.2_pre3.
+as 1.2 or 4.5.2. This string may be followed by a character such as 1.2a or
+4.5.2z. Note that this letter is \fBnot\fR meant to indicate alpha, beta,
+etc... status. For that, use the optional suffix; either _alpha, _beta, _pre
+(pre\-release), _rc (release candidate), or _p (patch). This means for the
+3rd pre\-release of a package, you would use something like 1.2_pre3. The
+suffixes here can be arbitrarily chained without limitation.
.TP
.B Atom Prefix Operators [> >= = <= <]
Sometimes you want to be able to depend on general versions rather than specifying
self.lookuplist.reverse()
# Blacklist vars that could interfere with portage internals.
- for blacklisted in ["PKGUSE", "PORTAGE_CONFIGROOT", "ROOT",
- "EPREFIX", "EROOT"]:
+ for blacklisted in "CATEGORY", "PKGUSE", "PORTAGE_CONFIGROOT", \
+ "ROOT", "EPREFIX", "EROOT":
for cfg in self.lookuplist:
- try:
- del cfg[blacklisted]
- except KeyError:
- pass
+ cfg.pop(blacklisted, None)
del blacklisted, cfg
if target_root is None:
for cpv in portdb.match(match_atom):
# only use new-style matches
if cpv.startswith("virtual/"):
- pkgs[cpv] = (cpv, pkgsplit(cpv), portdb)
+ pkgs[cpv] = (cpv, catpkgsplit(cpv)[1:], portdb)
if kwargs["use_binaries"] and "vartree" in trees[myroot]:
vardb = trees[myroot]["vartree"].dbapi
for cpv in vardb.match(match_atom):
if cpv.startswith("virtual/"):
if cpv in pkgs:
continue
- pkgs[cpv] = (cpv, pkgsplit(cpv), vardb)
+ pkgs[cpv] = (cpv, catpkgsplit(cpv)[1:], vardb)
if not (pkgs or mychoices):
# This one couldn't be expanded as a new-style virtual. Old-style
# virtuals have already been expanded by dep_virtual, so this one
match=1
uselist = []
if "?" in licenses:
- self.mysettings.setcpv(mycpv, mydb=self)
- uselist = self.mysettings.get("USE", "").split()
+ self.doebuild_settings.setcpv(mycpv, mydb=self)
+ uselist = self.doebuild_settings.get("USE", "").split()
try:
if self.mysettings.getMissingLicenses(
licenses, mycpv, uselist):