commit:     c27b5750eeb793a9c5d7d98a6021e9c9056a3ec6
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  1 12:15:55 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Aug  1 12:15:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c27b5750

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

 tests/atom_explode/dotest | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

Reply via email to