commit:     519ea2292367f3fc2cab6ec357d613cb6bb00bba
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 09:19:09 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 09:19:09 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=519ea229

tests: last attempt (?) to get qdepends test running on Travis

Perhaps old bash, or perhaps using dash (even though it shouldn't), well
maybe the greedy matches aren't supported well, replace with old cut to
split up strings.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/qdepends/dotest | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest
index 11f7aad..6378fc7 100755
--- a/tests/qdepends/dotest
+++ b/tests/qdepends/dotest
@@ -26,9 +26,11 @@ test() {
        while IFS= read -r line ; do
                case "${line}" in
                *:*)
-                       pkg=${line%%:*}
+                       # dinosaur style for Travis' /bin/bash (or /bin/sh?)
+                       pkg="$(echo "${line}" | cut -d':' -f1)"
+                       line="$(echo "${line}" | cut -d':' -f2-)"
                        env LC_ALL=C \
-                               echo "${pkg}: $(echo ${line#*:} | xargs -n1 | 
sort | xargs)"
+                               echo "${pkg}: $(echo "${line}" | xargs -n1 | 
sort | xargs)"
                        ;;
                *)
                        echo "${line}"

Reply via email to