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
net-proxy/squid: add workaround for 4.x to 5.x upgrade #29138
Conversation
Move /usr/share/squid/errors out of the way to avoid triggering an error from Portage when replacing symlinks with directories. We must do this in pkg_setup because the Portage safety check runs before pkg_preinst. Closes: https://bugs.gentoo.org/834503 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Pull Request assignmentSubmitter: @floppym net-proxy/squid: @hlein, @gentoo/proxy-maint Linked bugsBugs linked: 834503 In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Pull request CI reportReport generated at: 2023-01-16 20:28 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
I like this, but I also worry: doesn't this mean that before src_* begin, we will have already removed the link that a (presumably currently running) squid expects? So for instance if src_compile fails, we'll be left with the currently installed & running squid not being able to find its errors where it expects them? If I'm right to worry, @zmedico proposed an alternative: https://bugs.gentoo.org/664940#c3 Basically... rename to a temp name in src_*, which will satisfy the safety check, and then in pkg_preinst, remove old && rename new. That way we make no changes to the real system until we have a built copy ready to install. |
I think your concern is valid - I wouldn't worry about it too much given the situation we're in anyway if we couldn't think of a solution, but you've posed one that sounds workable. We can rename in just src_install (so it's as late as possible). I'm happy to implement that change if @floppym can't see a problem with it. I'm wondering why I didn't do it before though, but maybe that was just because I'd started looking at adjusting the Portage behaviour..? |
Maybe. "Handle this situation once and for all in the tooling" would be nice. But "have a pattern that can be applied whenever this arises" feels good enough ;) |
Yeah, the possibility of a build failure is why I renamed the directory in pkg_setup instead of just removing it. Zac's proposed solution (rename in src_install/pkg_preinst) seems good to me. |
Thanks folks, I'll pick that up now. |
Do it in src_install/pkg_preinst/pkg_postinst instead to reduce the window of fragility (if compile failed before for example, or did "ebuild ... clean configure", would have a half-migrated state). Bug: https://bugs.gentoo.org/834503 See: #29138 Signed-off-by: Sam James <sam@gentoo.org>
Move /usr/share/squid/errors out of the way to avoid triggering an error from Portage when replacing symlinks with directories.
We must do this in pkg_setup because the Portage safety check runs before pkg_preinst.
Closes: https://bugs.gentoo.org/834503