summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-12-20 15:10:58 +0000
committerNeil Williams <codehelp@debian.org>2015-12-20 15:10:58 +0000
commit2749d3f08e774f8b8f38a389edbd6dafbfd99d66 (patch)
tree2d9f3d8c79b3df91775e716a9297c0324354dce1 /bin
parentacafe6a9ccde31e313965fcfd044804c1306d47e (diff)
downloadvmdebootstrap-2749d3f08e774f8b8f38a389edbd6dafbfd99d66.tar.gz
add tests for combining image, tarball and squash
Diffstat (limited to 'bin')
-rwxr-xr-xbin/vmdebootstrap9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap
index b9dc559..d9252cb 100755
--- a/bin/vmdebootstrap
+++ b/bin/vmdebootstrap
@@ -152,6 +152,15 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
if self.settings['apt-mirror'] and not self.settings['configure-apt']:
raise cliapp.AppException(
'--apt-mirror requires --configure-apt as well.')
+ if self.settings['convert-qcow2'] and not self.settings['image']:
+ raise cliapp.AppException(
+ '--convert-qcow2 can only be used with --image.')
+ if self.settings['image'] and self.settings['tarball']:
+ raise cliapp.AppException(
+ 'Use --image or --tarball, not both.')
+ if self.settings['squash'] and self.settings['tarball']:
+ raise cliapp.AppException(
+ 'Use --squash or --tarball, not both.')
uefi = self.handlers[Uefi.name]
oldstable = distro.was_oldstable(datetime.date(2015, 4, 26))
uefi.check_settings(oldstable=oldstable)