mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Fix indentation, remove unused import
use absolute path to apt-get
This commit is contained in:
parent
e4e6035eb2
commit
8fe457b2dc
1 changed files with 19 additions and 21 deletions
|
@ -12,6 +12,7 @@ class AptSourcesBackports(Task):
|
|||
phase = phases.system_modification
|
||||
after = [AptSources]
|
||||
before = [AptUpgrade]
|
||||
|
||||
def run(self, info):
|
||||
sources_path = os.path.join(info.root, 'etc/apt/sources.list')
|
||||
with open(sources_path, 'a') as apt_sources:
|
||||
|
@ -26,13 +27,10 @@ class AddBackportsPackages(Task):
|
|||
phase = phases.system_modification
|
||||
after = [AptUpgrade]
|
||||
|
||||
|
||||
def run(self, info):
|
||||
if 'packages' not in info.manifest.plugins['backports']:
|
||||
return
|
||||
|
||||
from shutil import copy
|
||||
from common.tools import log_check_call
|
||||
|
||||
for pkg in info.manifest.plugins['backports']['packages']:
|
||||
log_check_call(['/usr/sbin/chroot', info.root, 'apt-get', 'install', '-y', '-t', info.manifest.system['release'] + '-backports', pkg])
|
||||
log_check_call(['/usr/sbin/chroot', info.root, '/usr/bin/apt-get', 'install', '-y', '-t', info.manifest.system['release'] + '-backports', pkg])
|
||||
|
|
Loading…
Add table
Reference in a new issue