Fix indentation, remove unused import

use absolute path to apt-get
This commit is contained in:
Anders Ingemann 2013-08-17 16:49:38 +02:00
parent e4e6035eb2
commit 8fe457b2dc

View file

@ -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])