From: Neil Williams Date: Tue, 23 Dec 2014 17:29:15 +0000 (+0000) Subject: drop necessary packages and use the include list directly X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=05dcc3af8835fce167b6ddd9f29d8c72ae0e8a58;p=forks%2Fvmdebootstrap.git drop necessary packages and use the include list directly --- diff --git a/vmdebootstrap b/vmdebootstrap index 6f104da..e736c60 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -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']: