* [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration
@ 2015-06-23 8:59 Ian Campbell
2015-06-23 9:25 ` Dario Faggioli
2015-06-23 9:41 ` Ian Jackson
0 siblings, 2 replies; 3+ messages in thread
From: Ian Campbell @ 2015-06-23 8:59 UTC (permalink / raw)
To: ian.jackson; +Cc: Dario.Faggioli, Ian Campbell, xen-devel
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>
Cc: Dario.Faggioli@citrix.com
---
README | 6 ++++++
cri-lock-repos | 8 ++++++++
standalone | 15 +++++++++++++++
3 files changed, 29 insertions(+)
diff --git a/README b/README
index 44e2989..a53fdc4 100644
--- a/README
+++ b/README
@@ -422,6 +422,12 @@ Stash
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
diff --git a/cri-lock-repos b/cri-lock-repos
index 7d10c87..ee0d9ba 100644
--- a/cri-lock-repos
+++ b/cri-lock-repos
@@ -20,6 +20,14 @@
. cri-common
repos=`getconfig Repos`
+if [ -z "$repos" ] ; then
+ echo "Repos must be configured in $config" >&2
+ exit 1
+fi
+if [ ! -d "$repos" ] ; then
+ echo "Repos $repos does not exist" >&2
+ exit 1
+fi
repos_lock="$repos/lock"
if [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
diff --git a/standalone b/standalone
index 91d18b5..a81a648 100755
--- a/standalone
+++ b/standalone
@@ -142,6 +142,20 @@ need_host() {
fi
}
+check_repos() {
+ local repos=`OSSTEST_CONFIG=$config 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
+}
+
ensure_logs() {
if [ ! -d "logs" ] ; then
mkdir "logs"
@@ -171,6 +185,7 @@ case $op in
;;
make-flight)
+ check_repos
need_flight
if [ $# -lt 1 ] ; then
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration
2015-06-23 8:59 [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration Ian Campbell
@ 2015-06-23 9:25 ` Dario Faggioli
2015-06-23 9:41 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Dario Faggioli @ 2015-06-23 9:25 UTC (permalink / raw)
To: Ian Campbell; +Cc: ian.jackson, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 835 bytes --]
On Tue, 2015-06-23 at 09:59 +0100, Ian Campbell wrote:
> 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>
> Cc: Dario.Faggioli@citrix.com
>
Reviewed-and-Tested-by: Dario Faggioli <dario.faggioli@citrix.com>
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration
2015-06-23 8:59 [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration Ian Campbell
2015-06-23 9:25 ` Dario Faggioli
@ 2015-06-23 9:41 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2015-06-23 9:41 UTC (permalink / raw)
To: Ian Campbell; +Cc: Dario.Faggioli, xen-devel
Ian Campbell writes ("[PATCH OSSTEST] Add some sanity checks for presence of Repos configuration"):
> 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.
I agree this should be improved, thanks.
> diff --git a/README b/README
> index 44e2989..a53fdc4 100644
> --- a/README
> +++ b/README
> @@ -422,6 +422,12 @@ Stash
> Images
> Logs
>
> +Repos Full path to a temporary directory where repositories \
can
> + be cloned. This is needed for anything which uses cr-dail\
y-branch,
> + including "./standalone make-flight" and
Shows wrap damage on my screen, as you see.
> diff --git a/cri-lock-repos b/cri-lock-repos
> index 7d10c87..ee0d9ba 100644
> --- a/cri-lock-repos
> +++ b/cri-lock-repos
> @@ -20,6 +20,14 @@
> . cri-common
>
> repos=`getconfig Repos`
> +if [ -z "$repos" ] ; then
> + echo "Repos must be configured in $config" >&2
> + exit 1
> +fi
...
> +check_repos() {
> + local repos=`OSSTEST_CONFIG=$config getconfig Repos`
> + if [ -z "$repos" ] ; then
> + echo "Repos must be configured in $config" >&2
> + exit 1
> + fi
...
This is the same code twice. I think check_repos could live in
cri-getconfig.
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-23 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-23 8:59 [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration Ian Campbell
2015-06-23 9:25 ` Dario Faggioli
2015-06-23 9:41 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.