containers / bootc

Boot and upgrade via container images
https://containers.github.io/bootc/
Apache License 2.0
769 stars 83 forks source link

install: Two rootfs cleanups #909

Closed cgwalters closed 2 days ago

cgwalters commented 3 days ago

install: Reduce usage of absolute path for rootfs

In the install flow we have both rootfs and rootfs_fd which hold the physical root. Using fd-relative accesses where we can provides a lot of advantages, so switch most uses over to the file descriptor.

Signed-off-by: Colin Walters walters@verbum.org


install: Rename rootfs -> physical_root

In the install flow we juggle three file systems in general:

"rootfs" in theory could be any of those three. In the install code it's the physical (target) root, so rename the variable to clarify.

Signed-off-by: Colin Walters walters@verbum.org


cgwalters commented 3 days ago

                      × Assignment operations require a variable.
                        ╭─[/var/tmp/tmt/run-002/plans/test-20-local-upgrade/tree/tests/booted/test-image-pushpull-upgrade.nu:86:5]
                     85 │     let booted_digest = $booted.imageDigest
                     86 │     print booted_digest = $booted_digest
                        ·     ─────────┬─────────
                        ·              ╰── needs to be a variable
                     87 │     # We should already be fetching updates from container storage
                        ╰────
                      help: try assigning to a variable or a cell path of a variable

Hmm, I think the nushell update here in EPEL (from yesterday) broke our test scripts. Looking at this

cgwalters commented 3 days ago

https://github.com/nushell/nushell/issues/14333 is also related to this I think