mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

In practice they are just typed functions with attributes, having a reference to an object is just confusing. So: Task.run() is now a classmethod
15 lines
432 B
Python
15 lines
432 B
Python
from base import Task
|
|
from common import phases
|
|
from common.tasks import apt
|
|
|
|
|
|
class DefaultPackages(Task):
|
|
description = 'Adding image packages required for virtualbox'
|
|
phase = phases.preparation
|
|
predecessors = [apt.AddDefaultSources]
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
kernels = {'amd64': 'linux-image-amd64',
|
|
'i386': 'linux-image-686', }
|
|
info.packages.add(kernels.get(info.manifest.system['architecture']))
|