mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
info.tarball is never used across tasks, make it local
This commit is contained in:
parent
764f8f759d
commit
55b2d2228f
1 changed files with 6 additions and 6 deletions
|
@ -49,12 +49,12 @@ class MakeTarball(Task):
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
executable, options, arguments = get_bootstrap_args(info)
|
executable, options, arguments = get_bootstrap_args(info)
|
||||||
info.tarball = get_tarball_filename(info)
|
tarball = get_tarball_filename(info)
|
||||||
if os.path.isfile(info.tarball):
|
if os.path.isfile(tarball):
|
||||||
log.debug('Found matching tarball, skipping creation')
|
log.debug('Found matching tarball, skipping creation')
|
||||||
else:
|
else:
|
||||||
from ..tools import log_call
|
from ..tools import log_call
|
||||||
status, out, err = log_call(executable + options + ['--make-tarball=' + info.tarball] + arguments)
|
status, out, err = log_call(executable + options + ['--make-tarball=' + tarball] + arguments)
|
||||||
if status not in [0, 1]: # variant=minbase exits with 0
|
if status not in [0, 1]: # variant=minbase exits with 0
|
||||||
msg = 'debootstrap exited with status {status}, it should exit with status 0 or 1'.format(status=status)
|
msg = 'debootstrap exited with status {status}, it should exit with status 0 or 1'.format(status=status)
|
||||||
raise TaskError(msg)
|
raise TaskError(msg)
|
||||||
|
@ -68,12 +68,12 @@ class Bootstrap(Task):
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
executable, options, arguments = get_bootstrap_args(info)
|
executable, options, arguments = get_bootstrap_args(info)
|
||||||
info.tarball = get_tarball_filename(info)
|
tarball = get_tarball_filename(info)
|
||||||
if os.path.isfile(info.tarball):
|
if os.path.isfile(tarball):
|
||||||
if not info.manifest.bootstrapper.get('tarball', False):
|
if not info.manifest.bootstrapper.get('tarball', False):
|
||||||
# Only shows this message if it hasn't tried to create the tarball
|
# Only shows this message if it hasn't tried to create the tarball
|
||||||
log.debug('Found matching tarball, skipping download')
|
log.debug('Found matching tarball, skipping download')
|
||||||
options.extend(['--unpack-tarball=' + info.tarball])
|
options.extend(['--unpack-tarball=' + tarball])
|
||||||
|
|
||||||
from ..tools import log_check_call
|
from ..tools import log_check_call
|
||||||
log_check_call(executable + options + arguments)
|
log_check_call(executable + options + arguments)
|
||||||
|
|
Loading…
Add table
Reference in a new issue