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

Re: [Xen-devel] [PATCH OSSTEST] Add some sanity checks for presence of Repos configuration



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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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