]> xenbits.xensource.com Git - osstest.git/commitdiff
mg-adjust-flight-makexrefs: Repair after "Use ^ for excluding jobs"
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 18 May 2018 13:42:13 +0000 (13:42 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 18 May 2018 13:42:13 +0000 (13:42 +0000)
In
  3b433e39382b13dda5d25aebecaf4864ef69c8d4
  "mg-adjust-flight-makexrefs: Use ^ for excluding jobs, not !"
a shell glob pattern was changed:
  -    !*)    ifmatch=$tokeep; action=$todelete ; glob="${glob#!}" ;;
  +    [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;

But in globbing, ! inside [ ] is a character class complement, not a
literal.  The result is that mg-adjust-flight-makexrefs would
generally replace jobs willy-nilly.

Fix this by using two separate glob patterns, and no character class.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
mg-adjust-flight-makexrefs

index 16a0d988c56e80a56e4651f27f52a92152d871b6..e3716c4cd8466418e667cd691e027f806870a6a7 100755 (executable)
@@ -60,7 +60,7 @@ for j in `./cs-adjust-flight $flight jobs-list '^build-'`; do
 
        for glob in $keepjobs; do
                case "$glob" in
-               [!^]*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
+               ^*|!*) ifmatch=$tokeep; action=$todelete ; glob="${glob#?}" ;;
                *)  ifmatch=$todelete; action=$tokeep ;;
                esac