diff --git a/common/tasks/packages.py b/common/tasks/packages.py index abccdf5..cdc9497 100644 --- a/common/tasks/packages.py +++ b/common/tasks/packages.py @@ -7,8 +7,12 @@ class HostPackages(Task): phase = phases.preparation def run(self, info): - packages = set(['debootstrap']) - info.host_packages = packages + info.host_packages = set() + info.host_packages.add('debootstrap') + + from base.fs.partitionmaps.none import NoPartitions + if not isinstance(info.volume.partition_map, NoPartitions): + info.host_packages.update(['parted', 'kpartx']) class ImagePackages(Task): @@ -16,9 +20,7 @@ class ImagePackages(Task): phase = phases.preparation def run(self, info): - # Add some basic packages we are going to need + info.img_packages = set(), set() + include, exclude = info.img_packages # We could bootstrap without locales, but things just suck without them, error messages etc. - include = set(['locales']) - exclude = set() - - info.img_packages = include, exclude + include.add('locales') diff --git a/providers/virtualbox/tasks/packages.py b/providers/virtualbox/tasks/packages.py index 871152a..228ad59 100644 --- a/providers/virtualbox/tasks/packages.py +++ b/providers/virtualbox/tasks/packages.py @@ -11,7 +11,7 @@ class HostPackages(Task): after = [packages.HostPackages] def run(self, info): - info.host_packages.update(['qemu-utils', 'parted', 'kpartx']) + info.host_packages.add('qemu-utils') if 'xfs' in (p.filesystem for p in info.volume.partition_map.partitions): info.host_packages.add('xfsprogs') @@ -25,7 +25,7 @@ class ImagePackages(Task): manifest = info.manifest include, exclude = info.img_packages # Add some basic packages we are going to need - include.update(['grub2']) + include.add('grub2') # In squeeze, we need a special kernel flavor for xen kernels = {'squeeze': {'amd64': 'linux-image-amd64',