-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
grml-live: fix falldown from c78f58bfee79af61276e3e91457a1b0faa55bbf5. #104
base: master
Are you sure you want to change the base?
Conversation
While deleting the bind-mount destination of mirror directories is fine in theory, we ended up deleting empty base directories as well. This is obviously bad, so let's avoid removing base directories by: - keeping a copy of all base directories (this should be updated periodically, but updates to base directories happen so rarely that it hardly matters) - wrapping the functionality of rmdir -p in a new function that makes sure to stop on base directories, no matter whether empty or not. Since we use that functionality for directories in a chroot (from the outside), additional code to handle chroots is necessary. With that, base directories should now be correctly protected from removal.
The list of protected base directories looks a bit ugly, but it's the shortest form I could come up with. If you don't like it, I can expand and re-wrap it. I can't just rewrap it without expanding, though. |
Uff, many thanks for working on a fix for this, but tbh, I'm a bit afraid of having to maintain this. :-/ |
I've outlined the issue in this comment in grml-live#103. In short, the issue is that using Instead, we could just revert the The Other alternatives include reimplementing |
This reverts commit c78f58b. While deleting the bind-mount destination of mirror directories is fine in theory, we end up deleting empty base directories as well, which is unexpected and unwanted behavior. See #104 for the related discussion, this issue needs further attention yet before we can include this in a new release of grml-live.
I tried to look into this and I think your suggestion to re-implement the The I think it's fine to change the Does this make sense? What do you think, @Ionic? For the time being, I reverted the |
Having a known end location for
Changed semantics are the only risk involved with that approach. I've used
Yeah, that's a bit cumbersome. We could make The problem with that approach, though, that apt is a bit... weird. In my setup, I wanted to modify grml packages without increasing their version number (mostly out of laziness). I thought that I could select the packages to be installed via pinning, favoring my local repository. What I didn't know until that point was that apt only uses pinning information for version selection - but the order of source entries is used to determine where to download packages from. Thus, after a bit of trial and error, I had to make sure that my local mirror was the first entry in the global Long story short: there isn't really a "one size fits all" solution here, sadly. Most users won't need such advanced setups, though. Maybe we should also introduce a new variable called something like
Yep, fine. |
This reverts commit c78f58b. While deleting the bind-mount destination of mirror directories is fine in theory, we end up deleting empty base directories as well, which is unexpected and unwanted behavior. See grml#104 for the related discussion, this issue needs further attention yet before we can include this in a new release of grml-live.
While deleting the bind-mount destination of mirror directories is fine
in theory, we ended up deleting empty base directories as well.
This is obviously bad, so let's avoid removing base directories by:
periodically, but updates to base directories happen so rarely that
it hardly matters)
sure to stop on base directories, no matter whether empty or not.
Since we use that functionality for directories in a chroot (from the
outside), additional code to handle chroots is necessary.
With that, base directories should now be correctly protected from
removal.