-
Notifications
You must be signed in to change notification settings - Fork 419
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
Allow --installroot on read-only bootc system #2121
Allow --installroot on read-only bootc system #2121
Conversation
1d04129
to
ea79cd8
Compare
Checking for |
But in this case, I believe the check is happening with a custom installroot on an otherwise read-only system. The |
The reason why I added a check for self.conf.installroot writability is that However, even my currently proposed code does not cover this case because the check happens too late, before confirming a transaction but after DNF attempting to update repositories and computing the transaction; DNF still reports:
@travier, you are right that the new Even if we moved the check before updating the repositories, it wouldn't catch all cases: E.g. "dnf --installroot /opt/foo" wouldn't work because /opt is not made writable by "bootc usr-overlay". I guess we need to admit that we cannot cover all cases and if the user is smart enough to use --installroot option, he's also smart enough to diagnose why DNF cannot write. (Why librpm does report "read-only filesystem" properly is another issue.) I will remove the clause and keep it as |
Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation. This patch augments the check for the installroot being different from /. It's pointless to check for installroot writability here because installroot is written before this check when updating the repositories and computing a transaction. Moving this check sooner would not help because some directories (/opt, /) are kept read-only even on writable bootc. Resolves: rpm-software-management#2108
ea79cd8
to
da2dfa7
Compare
OK, thanks for the explanation. |
a1aa8d0
into
rpm-software-management:master
Some people use --installroot on a read-only bootc system to install a system into a chroot subtree. However, current bootc check did not take into account --installroot and rejected the operation.
This patch augments the check for a writable installroot being different from /.
The comparison for / is there to deal with bootc systems with a writeable /. Currently it's uncerain whether systems like that exist.
Resolves: #2108