ostree: Use $basearch in repo file

Fixes: #413
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-10-03 08:00:53 +02:00
parent 446f21d4d7
commit 8880b1ea8a
2 changed files with 5 additions and 2 deletions

View File

@ -45,7 +45,10 @@ class OSTreeThread(WorkerThread):
repodir = os.path.join(workdir, 'config_repo')
source_variant = compose.variants[config['source_repo_from']]
source_repo = translate_path(compose, compose.paths.compose.repository(arch, source_variant))
source_repo = translate_path(compose,
compose.paths.compose.repository('$basearch',
source_variant,
create_dir=False))
self._clone_repo(repodir, config['config_url'], config.get('config_branch', 'master'))
self._tweak_mirrorlist(repodir, source_repo)

View File

@ -115,7 +115,7 @@ class OSTreeThreadTest(helpers.PungiTestCase):
for fp in ['fedora-rawhide.repo', 'fedora-24.repo', 'fedora-24.repo']:
with open(os.path.join(self.topdir, 'work/ostree-1/config_repo', fp)) as f:
self.assertIn('baseurl=http://example.com/Everything/x86_64/os',
self.assertIn('baseurl=http://example.com/Everything/$basearch/os',
f.read())
self.assertTrue(os.path.isdir(self.repo))