By providing an explicit fetch method in cri-getconfig which checks
things.
Without this then anything which uses cr-daily-branch produces the
rather cryptic:
+ test -f daily.xsettings
++ ./ap-print-url xen-unstable
with-lock-ex ./ap-print-url: /lock: Permission denied
+ treeurl=
FAILED rc=255
Which has caught out one or two people using standalone mode.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-and-Tested-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Images
Logs
+Repos Full path to a temporary directory where repositories
+ can be cloned. This is needed for anything which uses
+ cr-daily-branch, including "./standalone make-flight"
+ and "standalone-generate-dump-flight-runvars".
+
DebianSuite
GuestDebianSuite defaults to DebianSuite
print $c{"'$1'"} or die $!;
'
}
+
+getrepos() {
+ local repos=`getconfig Repos`
+ if [ -z "$repos" ] ; then
+ echo "Repos must be configured in $config" >&2
+ exit 1
+ fi
+ if [ ! -d "$repos" ] ; then
+ # Is likely an absolute path, so don't create automatically,
+ # just in case...
+ echo "Repos $repos does not exist" >&2
+ exit 1
+ fi
+ echo $repos
+}
. cri-common
-repos=`getconfig Repos`
+repos=`getrepos`
repos_lock="$repos/lock"
if [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
fi
}
+check_repos() {
+ # We don't care about the answer, just the error checking and
+ # logging to stderr.
+ OSSTEST_CONFIG=$config getrepos >/dev/null
+}
+
ensure_logs() {
if [ ! -d "logs" ] ; then
mkdir "logs"
;;
make-flight)
+ check_repos
need_flight
if [ $# -lt 1 ] ; then