From: Ian Jackson Date: Tue, 17 Jul 2018 14:50:35 +0000 (+0000) Subject: dummy flight generation: Tolerate lack of repos X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=71dbc20332d5dacc6dbabc3b9e0ed81e45e09d89;p=osstest.git dummy flight generation: Tolerate lack of repos 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 --- diff --git a/cri-getconfig b/cri-getconfig index b891c9b..f8397c1 100644 --- a/cri-getconfig +++ b/cri-getconfig @@ -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 diff --git a/cri-lock-repos b/cri-lock-repos index e75e3f5..e7e0fa8 100644 --- a/cri-lock-repos +++ b/cri-lock-repos @@ -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" "$@"