# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
-eval $(/usr/lib/portage/bin/portageq envvar -v FEATURES FETCHCOMMAND \
+type portageq > /dev/null || exit $?
+eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
+ PORTAGE_BIN_PATH PORTAGE_INST_UID PORTAGE_INST_GID PORTAGE_NICENESS \
GENTOO_MIRRORS PORTAGE_INST_UID PORTAGE_INST_GID PORTAGE_NICENESS \
PORTAGE_TMPDIR PORTDIR)
DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
renice $PORTAGE_NICENESS $$ > /dev/null
fi
-source /usr/lib/portage/bin/isolated-functions.sh || exit 1
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
if [ ! -d $DISTDIR ] ; then
mkdir -p $DISTDIR
trap die term
-
-eval $(/usr/lib/portage/bin/portageq envvar -v CONFIG_PROTECT \
+type portageq > /dev/null || exit $?
+eval $(portageq envvar -v CONFIG_PROTECT \
CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR ROOT USERLAND)
export PORTAGE_TMPDIR
except Exception, e:
writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in /var/db.\n",
noiselevel=-1)
- writemsg("!!! Please run /usr/lib/portage/bin/fix-db.py or\n",
+ writemsg("!!! Please run %s/fix-db.py or\n" % PORTAGE_BIN_PATH,
noiselevel=-1)
writemsg("!!! unmerge this exact version.\n", noiselevel=-1)
writemsg("!!! %s\n" % e, noiselevel=-1)
else:
writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in /var/db.\n",
noiselevel=-1)
- writemsg("!!! Please run /usr/lib/portage/bin/fix-db.py or\n",
+ writemsg("!!! Please run %s/fix-db.py or\n" % PORTAGE_BIN_PATH,
noiselevel=-1)
writemsg("!!! remerge the package.\n", noiselevel=-1)
sys.exit(1)
portage_util.writemsg(".")
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 "/usr/lib/portage/bin/clean_locks can fix stuck locks."
+ print "%s/clean_locks can fix stuck locks." % PORTAGE_BIN_PATH
print "Lockfile: " + lockfilename
time.sleep(3)