From 0dfb97b1d88509244d3844ca5a693c8141d55bd8 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 20 Dec 2015 10:46:41 +0000 Subject: apt-mirror requires configure-apt --- bin/vmdebootstrap | 3 +++ yarns/200-fast-tests.yarn | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap index 9555331..a986a6e 100755 --- a/bin/vmdebootstrap +++ b/bin/vmdebootstrap @@ -213,6 +213,9 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth raise cliapp.AppException( '%s is not a valid Debian or Ubuntu suite or codename.' % self.settings['distribution']) + if self.settings['apt-mirror'] and not self.settings['configure-apt']: + raise cliapp.AppException( + '--apt-mirror requires --configure-apt as well.') uefi = self.handlers[Uefi.name] oldstable = distro.was_oldstable(datetime.date(2015, 4, 26)) uefi.check_settings(oldstable=oldstable) diff --git a/yarns/200-fast-tests.yarn b/yarns/200-fast-tests.yarn index 89a01e8..8955d75 100644 --- a/yarns/200-fast-tests.yarn +++ b/yarns/200-fast-tests.yarn @@ -101,6 +101,13 @@ verify that vmdebootstrap parses the command line correctly. AND vmdebootstrap wrote an error message matching supports UEFI AND vmdebootstrap wrote an error message matching Wheezy + SCENARIO disallow apt-mirror without configure-apt + ASSUMING fast tests are requested + WHEN user attempts to run vmdebootstrap + ... --image=FOO --apt-mirror=mirror + THEN vmdebootstrap exited with a non-zero exit code + AND vmdebootstrap wrote an error message matching requires --configure-apt as well + SCENARIO default includes the kernel package ASSUMING fast tests are requested WHEN user attempts to run vmdebootstrap -- cgit v1.2.1