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':
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']: