mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Add option to install packages from tasksel
This commit is contained in:
parent
f315915a73
commit
60dbbee731
3 changed files with 21 additions and 0 deletions
|
@ -71,6 +71,9 @@
|
|||
]
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"install_standard": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
|
@ -65,6 +65,8 @@ def get_apt_set(manifest):
|
|||
base.append(apt.InstallTrustedKeys)
|
||||
if 'install' in manifest.packages:
|
||||
base.append(packages.AddManifestPackages)
|
||||
if manifest.packages.get('install_standard', False):
|
||||
base.append(packages.AddTaskselStandardPackages)
|
||||
return base
|
||||
|
||||
|
||||
|
|
|
@ -97,3 +97,19 @@ class InstallPackages(Task):
|
|||
|
||||
for path in absolute_package_paths:
|
||||
os.remove(path)
|
||||
|
||||
|
||||
class AddTaskselStandardPackages(Task):
|
||||
description = 'Adding standard packages from tasksel'
|
||||
phase = phases.package_installation
|
||||
predecessors = [apt.AptUpdate]
|
||||
successors = [InstallPackages]
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
import subprocess
|
||||
tasksel_packages = subprocess.check_output(['chroot', info.root,
|
||||
'tasksel', '--task-packages',
|
||||
'standard']).strip().split('\n')
|
||||
for pkg in tasksel_packages:
|
||||
info.packages.add(pkg)
|
||||
|
|
Loading…
Add table
Reference in a new issue