Skip to content

Commit

Permalink
qemuvariants: Extract ostree repo in mutate image, not class init
Browse files Browse the repository at this point in the history
A whole big twisted chain here; `cosa buildextend-aws` was crashing
in the FCOS promote job I think becuase it allocates a separate
tempdir.  The data we need (ostree commit) is in the `build_dir`.

So we could likely just tweak that, but while we're here, move
the import into the "prepare" phase and not the class init so
it's more "on demand".
  • Loading branch information
cgwalters committed May 3, 2022
1 parent 2624da8 commit a8e4b8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cosalib/qemuvariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ def __init__(self, **kwargs):

_Build.__init__(self, **kwargs)

repo = os.path.join(self._workdir, 'tmp/repo')
import_ostree_commit(repo, self._tmpdir, self.meta)

@property
def image_qemu(self):
"""
Expand Down Expand Up @@ -235,6 +232,10 @@ def mutate_image(self):
:param callback: callback function for extra processing image
:type callback: function
"""

repo = os.path.join(self._workdir, 'tmp/repo')
import_ostree_commit(repo, self.build_dir, self.meta)

work_img = os.path.join(self._tmpdir,
f"{self.image_name_base}.{self.image_format}")
final_img = os.path.join(os.path.abspath(self.build_dir),
Expand Down

0 comments on commit a8e4b8c

Please sign in to comment.