2013-08-10 19:01:54 +02:00
|
|
|
from base import Task
|
|
|
|
from common import phases
|
|
|
|
|
|
|
|
|
|
|
|
class HostPackages(Task):
|
|
|
|
description = 'Determining required host packages'
|
|
|
|
phase = phases.preparation
|
|
|
|
|
|
|
|
def run(self, info):
|
2013-10-27 09:10:37 +01:00
|
|
|
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'])
|
2013-08-10 19:01:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ImagePackages(Task):
|
|
|
|
description = 'Determining required image packages'
|
|
|
|
phase = phases.preparation
|
|
|
|
|
|
|
|
def run(self, info):
|
2013-10-27 09:10:37 +01:00
|
|
|
info.img_packages = set(), set()
|
|
|
|
include, exclude = info.img_packages
|
2013-09-22 15:40:51 +02:00
|
|
|
# We could bootstrap without locales, but things just suck without them, error messages etc.
|
2013-10-27 09:10:37 +01:00
|
|
|
include.add('locales')
|