Skip to content

sysupdate: install from a repository that a confext added in the same run - #110

Merged
cyphar merged 5 commits into
mainfrom
repo-adding-no-second-update-on-main
Nov 30, 2026
Merged

cyphar merged 5 commits into
mainfrom
repo-adding-no-second-update-on-main

Conversation

@mvo5

@mvo5 mvo5 commented Nov 24, 2026

Copy link
Copy Markdown
Member

If a confext adds a repository and sets a tag we need to reload the repo config first so that this works in a single update run.

Best viewed commit by commit.

@mvo5
mvo5 requested a review from cyphar November 24, 2026 16:50
mvo5 and others added 5 commits November 30, 2026 19:26
The configuration is loaded once in the Before hook and then stashed in
the context, which is fine for everything we have at the moment. However
quarry-sysupdate can end up changing its own configuration (a refreshed
confext may ship quarry-client drop-ins) and needs a way to load it
again with the same flags.

No functional change, a later patch in this series makes use of this.

Signed-off-by: Michael Vogt <michael@amutable.com>
The directory storing component definitions uses the reference time as
part of its name, which will cause issues if Init gets called multiple
times in the lifetime of a single process as it will mean that Abort
will no longer properly function and lots of things will likely go
badly.

No functional change for a single pass, a later patch in this series
makes quarry-sysupdate do more than one.

Signed-off-by: Michael Vogt <michael@amutable.com>
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
Applying the extension targets and running sysupdate for every component
is one unit of work, so give it a function of its own. A later patch in
this series needs to run it more than once.

This is just code movement, no functional changes. The only really
notable change is that the machine tags are now read before the
extension targets are applied instead of after, but applying them does
not touch the tags.

Signed-off-by: Michael Vogt <michael@amutable.com>
When commit 173fa9d ("sysupdate: run update loop until no tags
change anymore") switched to the loop model, it only retried calling
into sysupdate but that meant that we did not try to reinstall sysupdate
configuration files after each loop.

In practice, because the set of repositories will not change during the
loop this is not a functional change but it is a correctness one. A
future patch will make quarry-sysupdate re-parse its configuration
files, at which point this change is necessary.
difference but in a future k

Fixes: 173fa9d ("sysupdate: run update loop until no tags change anymore")
Signed-off-by: Michael Vogt <michael@amutable.com>
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
confexts can contain new drop-in files or other changes to our
configuration so we should really be re-parsing the configuration during
each iteration of the loop to make sure we are operating with the
current configuration set.

In practice this will be most useful as a workaround for links, where a
confext will contain a repository definition that the client should
fetch on the next loop iteration. Since this may not involve changing
the tags set in of itself, we should still continue looping if the set
of repositories has changed (as the comment notes, this is a suboptimal
heuristic but is okay for now).

Signed-off-by: Michael Vogt <michael@amutable.com>
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
@cyphar
cyphar force-pushed the repo-adding-no-second-update-on-main branch from 46a990f to 77ac8e2 Compare November 30, 2026 08:58
@cyphar
cyphar merged commit 2d42d5e into main Nov 30, 2026
17 checks passed
@cyphar
cyphar deleted the repo-adding-no-second-update-on-main branch November 30, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants