aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-08-01 14:15:55 +0200
committerFabian Groffen <grobian@gentoo.org>2018-08-01 14:15:55 +0200
commitc27b5750eeb793a9c5d7d98a6021e9c9056a3ec6 (patch)
treeb9ab2c3507eb9cc6d443c6d8cb1c3e90df8f558d
parentmain: fix potential buffer underrun (diff)
downloadportage-utils-c27b5750eeb793a9c5d7d98a6021e9c9056a3ec6.tar.gz
portage-utils-c27b5750eeb793a9c5d7d98a6021e9c9056a3ec6.tar.bz2
portage-utils-c27b5750eeb793a9c5d7d98a6021e9c9056a3ec6.zip
tests/atom_explode: deal with Python not finding portage, bug #661762
Check if the python atom check is going to work, if not, fall back to full pre-cooked files. If we just check for a portage tree in the filesystem, it may be that we end up without python support for portage, which would then obviously mismatch. Bug: https://bugs.gentoo.org/661762
-rwxr-xr-xtests/atom_explode/dotest4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest
index e911ab5..3a45fc1 100755
--- a/tests/atom_explode/dotest
+++ b/tests/atom_explode/dotest
@@ -3,7 +3,9 @@
. ../init.sh || exit 1
PORTDIR=$(DEBUG=: q -Ch 2>&1 | grep ^PORTDIR | awk '{print $NF}')
-if [[ -d "${PORTDIR}"/metadata/md5-cache ]] ; then
+if [[ -d "${PORTDIR}"/metadata/md5-cache ]] &&
+ "$s"/atom-explode.py < /dev/null >& /dev/null ;
+then
pushd "${PORTDIR}"/metadata/md5-cache >/dev/null || exit $?
if [[ $1 == -v ]] ; then