Make sure ${basearch} is also replaced with config['ostree_ref']

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
Patrick Uiterwijk 2019-01-09 21:39:33 +01:00
parent dbc0d5736c
commit c9c5fcac94

View File

@ -6,6 +6,7 @@ import os
from kobo import shortcuts from kobo import shortcuts
from kobo.threads import ThreadPool, WorkerThread from kobo.threads import ThreadPool, WorkerThread
from pungi.arch_utils import getBaseArch
from .base import ConfigGuardedPhase from .base import ConfigGuardedPhase
from .. import util from .. import util
from ..ostree.utils import get_ref_from_treefile, get_commitid_from_commitid_file from ..ostree.utils import get_ref_from_treefile, get_commitid_from_commitid_file
@ -99,6 +100,7 @@ class OSTreeThread(WorkerThread):
logger=self.pool._logger, logger=self.pool._logger,
) )
ref = config.get("ostree_ref") or original_ref ref = config.get("ostree_ref") or original_ref
ref = ref.replace("${basearch}", getBaseArch(arch))
# 'pungi-make-ostree tree' writes commitid to commitid.log in # 'pungi-make-ostree tree' writes commitid to commitid.log in
# logdir, except if there was no new commit we will get None # logdir, except if there was no new commit we will get None
# instead. If the commit id could not be read, an exception will be # instead. If the commit id could not be read, an exception will be