Skip to content
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 2 commits into from
Dec 14, 2023
Merged

Conversation

cgwalters
Copy link
Member

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.


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.
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jmarrero jmarrero merged commit 76ac2f7 into coreos:main Dec 14, 2023
17 checks passed
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants