From 071792bdd0dd75b75501e4375cf4e03edec1a0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 21 Mar 2018 14:41:42 +0100 Subject: [PATCH] ostree: Always substitute basearch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ref is not modified via pungi config, we read it from the treefile and substitute in basearch. When pungi is configured to replace it, it modifies the treefile and then used the value from config to avoid parsing the file. This however did not substitute the basearch value. We can simply use one code path for getting the value. This will work for both cases. Fixes: https://pagure.io/pungi/issue/866 Signed-off-by: Lubomír Sedlář --- pungi/ostree/tree.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pungi/ostree/tree.py b/pungi/ostree/tree.py index 64e34463..e30d3178 100644 --- a/pungi/ostree/tree.py +++ b/pungi/ostree/tree.py @@ -61,11 +61,7 @@ class Tree(OSTree): if not tag_ref: print('Not updating ref as configured') return - # if ostree_ref argument is given, it overrides ref value from treefile - if self.ostree_ref: - ref = self.ostree_ref - else: - ref = get_ref_from_treefile(self.treefile) + ref = get_ref_from_treefile(self.treefile) commitid = get_commitid_from_commitid_file(self.commitid_file) print('Ref: %r, Commit ID: %r' % (ref, commitid)) if ref and commitid: