mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Generalize req. host package additions
This commit is contained in:
parent
6c800145dc
commit
a397091e46
4 changed files with 8 additions and 19 deletions
|
@ -10,6 +10,13 @@ class HostPackages(Task):
|
|||
info.host_packages = set()
|
||||
info.host_packages.add('debootstrap')
|
||||
|
||||
from common.fs.loopbackvolume import LoopbackVolume
|
||||
if isinstance(info.volume, LoopbackVolume):
|
||||
info.host_packages.add('qemu-utils')
|
||||
|
||||
if 'xfs' in (p.filesystem for p in info.volume.partition_map.partitions):
|
||||
info.host_packages.add('xfsprogs')
|
||||
|
||||
from base.fs.partitionmaps.none import NoPartitions
|
||||
if not isinstance(info.volume.partition_map, NoPartitions):
|
||||
info.host_packages.update(['parted', 'kpartx'])
|
||||
|
|
|
@ -11,10 +11,6 @@ class HostPackages(Task):
|
|||
after = [packages.HostPackages]
|
||||
|
||||
def run(self, info):
|
||||
for partition in info.volume.partition_map.partitions:
|
||||
if partition.filesystem == 'xfs':
|
||||
info.host_packages.add('xfsprogs')
|
||||
break
|
||||
if info.manifest.volume['backing'] == 's3':
|
||||
info.host_packages.add('euca2ools')
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ def tasks(tasklist, manifest):
|
|||
from common.task_sets import partitioning_set
|
||||
tasklist.add(*partitioning_set)
|
||||
|
||||
tasklist.add(packages.HostPackages,
|
||||
packages.ImagePackages,
|
||||
tasklist.add(packages.ImagePackages,
|
||||
|
||||
loopback.Create,
|
||||
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
from base import Task
|
||||
from common import phases
|
||||
from common.tasks import packages
|
||||
from common.tasks.host import CheckPackages
|
||||
|
||||
|
||||
class HostPackages(Task):
|
||||
description = 'Determining required host packages'
|
||||
phase = phases.preparation
|
||||
before = [CheckPackages]
|
||||
after = [packages.HostPackages]
|
||||
|
||||
def run(self, info):
|
||||
info.host_packages.add('qemu-utils')
|
||||
if 'xfs' in (p.filesystem for p in info.volume.partition_map.partitions):
|
||||
info.host_packages.add('xfsprogs')
|
||||
|
||||
|
||||
class ImagePackages(Task):
|
||||
|
|
Loading…
Add table
Reference in a new issue