[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 1/9] dummy flight generation: Tolerate lack of repos



From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
---
 cri-getconfig  | 2 +-
 cri-lock-repos | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cri-getconfig b/cri-getconfig
index b891c9b1..f8397c18 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 e75e3f59..e7e0fa87 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" "$@"
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.