]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
drop necessary packages and use the include list directly
authorNeil Williams <codehelp@debian.org>
Tue, 23 Dec 2014 17:29:15 +0000 (17:29 +0000)
committerNeil Williams <codehelp@debian.org>
Tue, 23 Dec 2014 17:29:15 +0000 (17:29 +0000)
vmdebootstrap

index 6f104da5ea487aa824b3673e013ecfb34c644e23..e736c604ce108422bcc6e8dfb68c54c910516111 100755 (executable)
@@ -370,15 +370,13 @@ class VmDebootstrap(cliapp.Application):  # pylint: disable=too-many-public-meth
         msg = "(%s)" % self.settings['variant'] if self.settings['variant'] else ''
         self.message('Debootstrapping %s %s' % (self.settings['distribution'], msg))
 
-        if self.settings['foreign']:
-            necessary_packages = []
-        else:
-            necessary_packages = ['acpid']
+        include = self.settings['package']
 
-        if self.settings['grub']:
-            necessary_packages.append('grub2')
+        if not self.settings['foreign']:
+            include.append('acpid')
 
-        include = self.settings['package']
+        if self.settings['grub']:
+            include.append('grub2')
 
         if not self.settings['no-kernel']:
             if self.settings['arch'] == 'i386':
@@ -392,12 +390,10 @@ class VmDebootstrap(cliapp.Application):  # pylint: disable=too-many-public-meth
             include.append('sudo')
 
         args = ['debootstrap', '--arch=%s' % self.settings['arch']]
+
         if self.settings['package']:
             args.append(
                 '--include=%s' % ','.join(include))
-            if len(necessary_packages) > 0:
-                args.append(
-                    '--include=%s' % ','.join(necessary_packages))
         if self.settings['foreign']:
             args.append('--foreign')
         if self.settings['variant']: