-
Notifications
You must be signed in to change notification settings - Fork 198
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
Overrides don't check for shared files when removing packages #1145
Comments
Reproduced this. |
I installed the version of |
I only briefly looked at this; I did verify that using I also noticed that when booted into a system with this override active, trying to do anything else with the package side caused failures. Something else I noticed:
|
Offhand I wouldn't be surprised if this didn't reproduce doing a fresh "compose tree" for the result...how we handle SELinux is extraordinarily complex, things like 3d3dd37 |
rpm-ostree override replace
can cause RPM db to go missingrpm-ostree override replace
with selinux-policy can cause failures (missing rpmdb)
Ahh yup, I can reproduce this as well. Will take a look at it tomorrow! |
So, the proximate cause for this is: https://src.fedoraproject.org/rpms/selinux-policy/pull-request/8. The ultimate cause is that we don't check during replacements whether a file entry also belongs to another RPM before removing it. I started playing with librpm for how to do this, but it's turning out... more involved than I thought. Will have to get back to this. I did check that with the patch above, doing |
rpm-ostree override replace
with selinux-policy can cause failures (missing rpmdb)
Shouldn't we just not remove non-empty directories or so? |
Not all files from an RPM are necessarily removed during pkg erasure. For example, files which are shared between pkgs shouldn't be deleted. Similarly, not all files in an RPM are necessarily copied during pkg installs. This is the case for multilib handling, which is a mess in its own right. But such is the cost of trying to replace major parts of a long-standing foundational project like RPM. This patch adds some smarts to the way we do overlays and overrides to handle these cases by calculating beforehand which files we *should't* checkout/delete. Closes: coreos#1217 Closes: coreos#1145
Now:
\o/ |
Using Fedora 27 Atomic Host on the
testing
branch, I usedrpm-ostree override replace
to replace theselinux-policy
andselinux-policy-targeted
packages. When I rebooted into the new deployment, I was unable to query the RPM db.I used the following build for the
replace
operation - https://bodhi.fedoraproject.org/updates/FEDORA-2017-8225c4e502The text was updated successfully, but these errors were encountered: