-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tmpfiles handle old cache #4727
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We weren't actually formatting these, so the error looks like: `error: Deduplicate tmpfiles entries: readdir {RPMOSTREE_TMPFILESD}: No such file or directory (os error 2)` It's simpler to just not format.
I actually did get bitten by having an old cache where there's nothing in the `RPMOSTREE_TMPFILESD` dir. Just handle the case where the directory doesn't exist. For good measure, also gracefully no-op if the destination tmpfiles.d directory doesn't exist.
jmarrero
approved these changes
Dec 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
HuijingHei
added a commit
to HuijingHei/rpm-ostree
that referenced
this pull request
Dec 29, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since coreos#4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. Also needs coreos#4727. Fixes: fedora-silverblue/issue-tracker#523
HuijingHei
added a commit
to HuijingHei/rpm-ostree
that referenced
this pull request
Dec 29, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since coreos#4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. Also needs coreos#4727. Fixes: fedora-silverblue/issue-tracker#523
HuijingHei
added a commit
to HuijingHei/rpm-ostree
that referenced
this pull request
Dec 29, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since coreos#4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. With this patch, check if `usr/lib/rpm-ostree/tmpfiles.d` does not exist, will use old `usr/lib/tmpfiles.d` instead. Also needs coreos#4727. Fixes: fedora-silverblue/issue-tracker#523
HuijingHei
added a commit
to HuijingHei/rpm-ostree
that referenced
this pull request
Dec 29, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since coreos#4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. With this patch, check if `usr/lib/rpm-ostree/tmpfiles.d` does not exist, will use old `usr/lib/tmpfiles.d` instead. Also needs coreos#4727. Fixes: fedora-silverblue/issue-tracker#523
HuijingHei
added a commit
to HuijingHei/rpm-ostree
that referenced
this pull request
Dec 29, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since coreos#4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. With this patch, check if `usr/lib/rpm-ostree/tmpfiles.d` does not exist, will use old `usr/lib/tmpfiles.d` instead. Also needs coreos#4727. Fixes: fedora-silverblue/issue-tracker#523
cgwalters
pushed a commit
that referenced
this pull request
Dec 30, 2023
When removing package, will also remove the generated tmpfile config under the rpm-ostree tmpfiles.d directory. Since #4697, we use the new directory like `usr/lib/rpm-ostree/tmpfiles.d`, but for old `usr/lib/tmpfiles.d`, failed with `error: opendir(usr/lib/ rpm-ostree/tmpfiles.d): No such file or directory`. With this patch, check if `usr/lib/rpm-ostree/tmpfiles.d` does not exist, will use old `usr/lib/tmpfiles.d` instead. Also needs #4727. Fixes: fedora-silverblue/issue-tracker#523
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tmpfiles: Fix error contexts
We weren't actually formatting these, so the error looks like:
error: Deduplicate tmpfiles entries: readdir {RPMOSTREE_TMPFILESD}: No such file or directory (os error 2)
It's simpler to just not format.
tmpfiles: Handle old caches
I actually did get bitten by having an old cache where
there's nothing in the
RPMOSTREE_TMPFILESD
dir.Just handle the case where the directory doesn't exist.
For good measure, also gracefully no-op if the destination tmpfiles.d
directory doesn't exist.