-
Notifications
You must be signed in to change notification settings - Fork 427
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
debian: succeed distrobox-init if custom image has undergone releaseinfo change #898
debian: succeed distrobox-init if custom image has undergone releaseinfo change #898
Conversation
If you use an old development image that has changed from stable to oldstable or from oldstable to oldoldstable, plain apt-update will require you to interactively or explicitly allow it. This patch fixes both the first run and upgrade scenarios. Additionally, if you use the vanilla PS1 prompt of a debian install on the host, debian defaults to prepend ($debian_chroot) to it. Set this to either CONTAINER_ID or distrobox makes it easier.
Hi @aquaherd I'm not sure about this In the 1st scenario (line 433) this should never happen, especially if you pull during create |
I just checked, the Acquire... hook does not work:
Apparently the hook is established after 'Installing basic packages' |
What type of image are you using? It seems to me strange that it wants to move from stable->oldstable during the init (where an image should be fresh) |
The image is frozen in around 2019 from then stable debian buster (10) and used as-is for ephemeral build-only containers daily. In another project from 2014 I even have a debian jessie (8), but I was smart to point the container images' sources list to snapshot.debian.org so that this problem does not manifest. If you can't accept my patch I would modify the above image, too. I don't know if my use case is too esoteric but imagine the benefit distrobox could provide to the maintainability of critical infrastructure projects - they also have maintenance cycles in the decades and may want to substitute some pet VMs with the much smaller distroboxes and maybe they will run into the same problem as me. |
I get it now, but as you can see from the CI, this flag is not compatible with older versions of debian: So I'm unsure this is a PR I can merge Can you see if in your use-case, using a
This would do the update first thing before the package setup, and you would be able to fix it before the package management. |
@aquaherd seems like the "-y" works for every release |
the -y does not work but adding the option as -o did. |
Shouldn't the -o flag be the same as putting the config in the apt.conf file? |
Yes. I will update it accordingly and test. Unfortunately I am on vacation for the next 2-3 weeks. If its OK by you, keep this open until I am back. |
No problem at all I'm on vacation too 😄 |
ba8e5e7
to
0c4615b
Compare
456475a
to
d065c94
Compare
Thanks @aquaherd reviewed this and seems all good to me :) Thanks a lot, merging! |
Thank you, too. :) |
If you use an old development image that has changed from stable to oldstable or from oldstable to oldoldstable between image creation and distrobox creation, plain apt-update will require you to interactively or explicitly allow it. This patch fixes both the first run and upgrade scenarios.
Additionally, if you use the vanilla PS1 prompt of a debian install on the host, debian defaults to prepend ($debian_chroot) to it. Setting this to either CONTAINER_ID or distrobox makes it easier.