From c6caa0a0adbcacc6acfab6ca4cf0268d741deff6 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Thu, 17 Jan 2013 21:57:50 +0100 Subject: [PATCH] Fix "--extension=" with empty parameter --- KNOWN_BUGS.markdown | 2 -- bin/xen-create-image | 2 +- bin/xt-create-xen-config | 2 +- debian/changelog | 1 + t/getopt.t | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/KNOWN_BUGS.markdown b/KNOWN_BUGS.markdown index 1fed3e5..3ca7728 100644 --- a/KNOWN_BUGS.markdown +++ b/KNOWN_BUGS.markdown @@ -35,8 +35,6 @@ Bugs to fix rather soon * `xen-list-images` does not honour `--extension` -* `--extension=''` (i.e. empty string) no more works - Bugs to fix later ----------------- diff --git a/bin/xen-create-image b/bin/xen-create-image index c07d29b..3643ae4 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1668,7 +1668,7 @@ sub parseCommandLineArguments "keep", \$CONFIG{ 'keep' }, "template=s", \&checkOption, "output=s", \&checkOption, - "extension=s", \&checkOption, + "extension:s", \&checkOption, "dontformat", \&checkOption, # Help options diff --git a/bin/xt-create-xen-config b/bin/xt-create-xen-config index 576112a..1c7e8dd 100755 --- a/bin/xt-create-xen-config +++ b/bin/xt-create-xen-config @@ -215,7 +215,7 @@ sub parseCommandLineArguments # GetOptions( "admins=s", \$ENV{ 'admins' }, "output=s", \$CONFIG{ 'output' }, - "extension=s", \$CONFIG{ 'extension' }, + "extension:s", \$CONFIG{ 'extension' }, "template=s", \$CONFIG{ 'template' }, "verbose", \$CONFIG{ 'verbose' }, "help", \$HELP, diff --git a/debian/changelog b/debian/changelog index 77378fc..7da6994 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low - Also recognize "M" and "G" instead of "MB" and "GB" as size unit for --memory. (Closes: #691320) Document the recognized units. - Default DomUs to use the noop scheduler (Closes: #693131) + - Fixes "--extension=" with empty parameter. - Remove CVS revisions from --version output - Preliminary support for Debian Jessie and Ubuntu Raring - Preliminary support for xl toolstack diff --git a/t/getopt.t b/t/getopt.t index 702049e..12070d2 100755 --- a/t/getopt.t +++ b/t/getopt.t @@ -114,9 +114,9 @@ sub testFile } #print " - remove quotes : $o "; # - # Discard anything after "=", or " " + # Discard anything after "=", ":", or " " # - if ( $o =~ /(.*)[ \t=]+(.*)/ ) + if ( $o =~ /(.*)[ \t=:]+(.*)/ ) { $o = $1; }