rpm-ostree/src/libpriv
Colin Walters 30bed29230 daemon/upgrader: Rework layer tracking
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
2017-01-18 20:05:19 +00:00
..
libsd-locale-util.c status: Import systemd bits to use UTF-8 circle 2016-06-09 19:33:19 +00:00
libsd-locale-util.h status: Import systemd bits to use UTF-8 circle 2016-06-09 19:33:19 +00:00
rpmostree-bwrap.c bwrap: Turn on all namespaces 2017-01-16 14:40:47 +00:00
rpmostree-bwrap.h libpriv: Enhance internal bwrap API 2017-01-11 18:39:26 +00:00
rpmostree-core.c core: Split up overlay/commit API 2017-01-11 18:39:25 +00:00
rpmostree-core.h core: Split up overlay/commit API 2017-01-11 18:39:25 +00:00
rpmostree-json-parsing.c build: Split up src into app/ and libpriv/ 2015-04-08 16:17:06 -04:00
rpmostree-json-parsing.h build: Split up src into app/ and libpriv/ 2015-04-08 16:17:06 -04:00
rpmostree-kernel.c libpriv: Move kernel finalization into a helper function 2017-01-13 20:08:24 +00:00
rpmostree-kernel.h libpriv: Move kernel finalization into a helper function 2017-01-13 20:08:24 +00:00
rpmostree-origin.c daemon/upgrader: Rework layer tracking 2017-01-18 20:05:19 +00:00
rpmostree-origin.h daemon/upgrader: Rework layer tracking 2017-01-18 20:05:19 +00:00
rpmostree-output.c output: support printf type usage 2016-05-27 22:18:44 +00:00
rpmostree-output.h output: support printf type usage 2016-05-27 22:18:44 +00:00
rpmostree-passwd-util.c passwd_prepare_rpm_layering: account for local entries 2017-01-08 21:05:06 +00:00
rpmostree-passwd-util.h passwd_prepare_rpm_layering: account for local entries 2017-01-08 21:05:06 +00:00
rpmostree-postprocess.c libpriv: Move kernel finalization into a helper function 2017-01-13 20:08:24 +00:00
rpmostree-postprocess.h postprocess: More fd-relative-ification 2016-11-04 14:59:27 +00:00
rpmostree-refsack.c Update for libhif -> libdnf 2016-08-04 01:10:08 +00:00
rpmostree-refsack.h Update for libhif -> libdnf 2016-08-04 01:10:08 +00:00
rpmostree-refts.c libpriv: Add RpmOstreeRefTs and API to create one from a commit 2015-05-23 09:30:57 -04:00
rpmostree-refts.h Update for libhif -> libdnf 2016-08-04 01:10:08 +00:00
rpmostree-rpm-util.c core: add support for layering non-root files 2017-01-08 21:05:06 +00:00
rpmostree-rpm-util.h core: add support for layering non-root files 2017-01-08 21:05:06 +00:00
rpmostree-script-gperf.gperf scripts: Ignore glibc-headers.prein and vagrant*.prein 2016-06-29 13:53:42 +00:00
rpmostree-scripts.c libpriv: Enhance internal bwrap API 2017-01-11 18:39:26 +00:00
rpmostree-scripts.h core: add support for layering non-root files 2017-01-08 21:05:06 +00:00
rpmostree-unpacker.c core: add support for layering non-root files 2017-01-08 21:05:06 +00:00
rpmostree-unpacker.h core: Make unprivileged case ignore ownership, add "_compose" context 2016-06-20 15:10:44 +00:00
rpmostree-util.c daemon: Introduce an origin structure 2017-01-13 20:08:24 +00:00
rpmostree-util.h daemon: Introduce an origin structure 2017-01-13 20:08:24 +00:00