]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
dummy flight generation: Tolerate lack of repos
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 17 Jul 2018 14:50:35 +0000 (14:50 +0000)
committerRoger Pau Monne <roger.pau@citrix.com>
Tue, 17 Jul 2018 15:04:53 +0000 (17:04 +0200)
In particular
  OSSTEST_CONFIG=standalone-config-example eatmydata bash -x ./standalone-generate-dump-flight-runvars
should not require ~/osstest-repos to exist.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
cri-getconfig
cri-lock-repos

index b891c9b1d68f6d762f8e5f14396783e0c0d31e99..f8397c185a05b6836b69c56953f160be0345eb29 100644 (file)
@@ -42,7 +42,7 @@ getrepos() {
                echo "Repos must be configured in $config" >&2
                exit 1
        fi
-       if [ ! -d "$repos" ] ; then
+       if [ x"$AP_FETCH_PLACEHOLDERS" != xy ] && [ ! -d "$repos" ] ; then
                # Is likely an absolute path, so don't create automatically,
                # just in case...
                echo "Repos $repos does not exist" >&2
index e75e3f59563888c2a34f9873eeb676fa9e86ebdf..e7e0fa8703a4fced5cc0d2806f0fb464666c594b 100644 (file)
@@ -22,7 +22,9 @@
 repos=`getrepos`
 repos_lock="$repos/lock"
 
-if [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
+if [ "x$AP_FETCH_PLACEHOLDERS" = xy ] && ! [ -e $repos ]; then
+       echo "AP_FETCH_PLACEHOLDERS, not locking" >&2
+elif [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
        OSSTEST_REPOS_LOCK_LOCKED="$repos_lock" \
        exec with-lock-ex -w "$repos_lock" \
        "$0" "$@"