From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Ian Jackson" <Ian.Jackson@eu.citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [OSSTEST PATCH 08/10] mg-anoint: Support mg-anoint retrieve --tolerate-unprepared
Date: Thu, 17 May 2018 12:16:57 +0100 [thread overview]
Message-ID: <1526555819-29883-9-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1526555819-29883-1-git-send-email-ian.jackson@eu.citrix.com>
make-*-flight is going to want this.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
mg-anoint | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/mg-anoint b/mg-anoint
index 522cbdd..d09124b 100755
--- a/mg-anoint
+++ b/mg-anoint
@@ -15,10 +15,12 @@
# --allow-blessed=BLESSING,... default is from `prepare'
# --allow-job-status=STATUS,... default is only `pass'
#
-# ./mg-anoint retrieve REFKEY
+# ./mg-anoint retrieve [--tolerate-unprepared] REFKEY
# => FLIGHT JOB
# if nothing anointed yet, prints nothing and exits 0
# if anointment not prepared, fails
+# With --tolerate-unprepared, it is not an error if nothing is
+# reported because the anointment has not been prepared.
#
# ./mg-anoint list-prepared REFKEY-GLOB
# => possibly empty list of REFKEYs
@@ -294,6 +296,11 @@ END
}
sub cmd_retrieve {
+ my $tolerate_unprepared;
+ if (@ARGV && $ARGV[0] eq '--tolerate-unprepared') {
+ shift @ARGV;
+ $tolerate_unprepared = 1;
+ }
die unless @ARGV==1;
die if $ARGV[0] =~ m/^-/;
my ($refkey) = @ARGV;
@@ -305,7 +312,8 @@ sub cmd_retrieve {
@o = ();
$task_q->execute($refkey);
my ($task) = $task_q->fetchrow_array();
- die "no such anointment kind \`$refkey'" unless defined $task;
+ die "no such anointment kind \`$refkey'"
+ unless defined $task or $tolerate_unprepared;
$mostrecent_q->execute($task);
my $row = $mostrecent_q->fetchrow_hashref();
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-05-17 11:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 11:16 [OSSTEST PATCH 00/10] UEFI and commissioning fixes Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 01/10] Osstest/TestSupport: Use right arch for UEFI grub setup Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 02/10] Osstest/Debian: preseed: Force UEFI install regardless Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 03/10] README.dev: Fix a typo Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 04/10] README.dev: Discuss setting Firmware for UEFI machines Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 05/10] README.dev: Make example commisioning runes use $hn variable Ian Jackson
2018-05-17 11:16 ` [OSSTEST PATCH 06/10] Perl @INC path: fix a few more scripts to use BEGIN Ian Jackson
2018-05-17 12:53 ` Roger Pau Monné
2018-05-17 11:16 ` [OSSTEST PATCH 07/10] mg-anoint: Make readonly operations "work" in standalone mode Ian Jackson
2018-05-17 14:20 ` Roger Pau Monné
2018-05-17 11:16 ` Ian Jackson [this message]
2018-05-17 14:22 ` [OSSTEST PATCH 08/10] mg-anoint: Support mg-anoint retrieve --tolerate-unprepared Roger Pau Monné
2018-05-17 11:16 ` [OSSTEST PATCH 09/10] mfi-common: set_freebsd_runvars: Never set freebsd_distpath to `/amd64' etc Ian Jackson
2018-05-17 14:26 ` Roger Pau Monné
2018-05-17 11:16 ` [OSSTEST PATCH 10/10] mfi-common: Fall back to anointed builds in Executive mode Ian Jackson
2018-05-17 14:29 ` Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1526555819-29883-9-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).