3e800998 broke storage writing in two cases: regular live installs and ostree installs. The old write_storage_late check checked for flags.livecdInstall and ksdata.ostreesetup.seen as well as ksdata.method.method == "liveimg". The new check in writeStorageLate() dropped those two, only keeping the method check. The method is only 'liveimg' when doing a kickstart-driven install with the 'liveimg' parameter, which is a fairly niche case - the method is not 'liveimg' on a regular live install (it's 'harddrive').
From: Adam Williamson awilliam@redhat.com
3e800998 broke storage writing in two cases: regular live installs and ostree installs. The old write_storage_late check checked for flags.livecdInstall and ksdata.ostreesetup.seen as well as ksdata.method.method == "liveimg". The new check in writeStorageLate() dropped those two, only keeping the method check. The method is only 'liveimg' when doing a kickstart- driven install with the 'liveimg' parameter, which is a fairly niche case - the method is not 'liveimg' on a regular live install (it's 'harddrive'). --- pyanaconda/packaging/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index ada75ff..876f6ea 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -614,7 +614,8 @@ def writeStorageLate(self): every payload except for dnf. Payloads should only implement one of these methods by overriding the unneeded one with a pass. """ - if self.data.method.method == "liveimg" and not flags.dirInstall: + islive = self.data.method.method == "liveimg" or flags.livecdInstall + if (islive or self.data.ostreesetup.seen) and not flags.dirInstall: if iutil.getSysroot() != iutil.getTargetPhysicalRoot(): setSysroot(iutil.getTargetPhysicalRoot(), iutil.getSysroot())
The point of that commit was to get rid of these crazy conditionals. I'd like to find a way to do as much of this testing as possible by using simpler methods on classes than having these huge multi-part conditionals no one can follow.
I tested this via an updates.img and it at least fixes the regular live install case, I'm not really set up to test the other two cases.
Well if there's a cleaner way to do it right now it's fine by me, but this is an Alpha blocker so it does need addressing reasonably quickly. I couldn't immediately see a better way to do the check.
Well, here's a thought - there are payloads that look like they map quite closely to the three paths in question:
regular live install - flags.livecdInstall - class LiveImagePayload liveimg method - method.liveimg - class LiveImageKSPayload ostree install - ksdata.ostreesetup.seen - class RPMOSTreePayload
so can't we just dump the conditional (or simplify it to `if not flags.dirinstall`, whatever that's there for) and ensure that those three payloads use `writeStorageLate()` and all other payloads don't?
anaconda-patches@lists.fedorahosted.org