30bed29230
Working on initramfs, I hit a subtle issue with the fact that I was trying to "redeploy", but with the origin file changed during the process. Previously, it was a bit unclear which parts of the upgrader logic are operating on the *new* origin versus the "original origin". The package layering code in the upgrader explicitly carries a delta on top in the "add/remove" hash sets, which means it isn't visible to `rpmostree_origin_is_locally_assembled()`. Whereas for initramfs, I set a new origin. This broke things since we were expecting to find a parent commit, but the original origin wasn't locally assembled. When looking more at this, I realized there's a far simpler model - rather than keeping track of commit + origin, and using the origin to try to determine whether or not the commit is layered, we can keep track of `base_revision` and `final_revision`, and the latter is only set if we're doing layering. The diff speaks for itself here - a lot of fragile logic looking at the origin drops away. The next step here is probably to drop away the package layering hash sets, but I'm trying to not change everything at once. Closes: #579 Approved by: jlebon |
||
---|---|---|
.. | ||
libsd-locale-util.c | ||
libsd-locale-util.h | ||
rpmostree-bwrap.c | ||
rpmostree-bwrap.h | ||
rpmostree-core.c | ||
rpmostree-core.h | ||
rpmostree-json-parsing.c | ||
rpmostree-json-parsing.h | ||
rpmostree-kernel.c | ||
rpmostree-kernel.h | ||
rpmostree-origin.c | ||
rpmostree-origin.h | ||
rpmostree-output.c | ||
rpmostree-output.h | ||
rpmostree-passwd-util.c | ||
rpmostree-passwd-util.h | ||
rpmostree-postprocess.c | ||
rpmostree-postprocess.h | ||
rpmostree-refsack.c | ||
rpmostree-refsack.h | ||
rpmostree-refts.c | ||
rpmostree-refts.h | ||
rpmostree-rpm-util.c | ||
rpmostree-rpm-util.h | ||
rpmostree-script-gperf.gperf | ||
rpmostree-scripts.c | ||
rpmostree-scripts.h | ||
rpmostree-unpacker.c | ||
rpmostree-unpacker.h | ||
rpmostree-util.c | ||
rpmostree-util.h |