summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-01-16 15:12:33 -0500
committerMike Gilbert <floppym@gentoo.org>2023-01-16 15:28:47 -0500
commit0ae592744da6c4b5cd96f1b92d4f92cc23f9dbcc (patch)
treeb70360f27656f8a1f542167761de970785a49d88 /net-proxy
parentdev-scheme/bigloo: do not install links to static libs (diff)
downloadgentoo-0ae592744da6c4b5cd96f1b92d4f92cc23f9dbcc.tar.gz
gentoo-0ae592744da6c4b5cd96f1b92d4f92cc23f9dbcc.tar.bz2
gentoo-0ae592744da6c4b5cd96f1b92d4f92cc23f9dbcc.zip
net-proxy/squid: add workaround for 4.x to 5.x upgrade
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>
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/squid/squid-5.7.ebuild18
1 files changed, 17 insertions, 1 deletions
diff --git a/net-proxy/squid/squid-5.7.ebuild b/net-proxy/squid/squid-5.7.ebuild
index 92400122c91f..60bc862ec71f 100644
--- a/net-proxy/squid/squid-5.7.ebuild
+++ b/net-proxy/squid/squid-5.7.ebuild
@@ -59,7 +59,6 @@ DEPEND="
systemd? ( sys-apps/systemd:= )
"
RDEPEND="
- !!<net-proxy/squid-5
${DEPEND}
mysql? ( dev-perl/DBD-mysql )
postgres? ( dev-perl/DBD-Pg )
@@ -86,6 +85,19 @@ pkg_pretend() {
fi
}
+pkg_setup() {
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "${v}" -lt 5; then
+ ewarn "Moving ${EROOT}/usr/share/squid/errors out of the way (bug 834503)"
+ mv -v "${EROOT}"/usr/share/squid/errors{,.bak}
+ break
+ fi
+ done
+ fi
+}
+
src_prepare() {
default
@@ -359,6 +371,10 @@ src_install() {
}
pkg_postinst() {
+ if [[ -e ${EROOT}/usr/share/squid/errors.bak ]]; then
+ rm -rv "${EROOT}"/usr/share/squid/errors.bak
+ fi
+
elog "A good starting point to debug Squid issues is to use 'squidclient mgr:' commands such as 'squidclient mgr:info'."
if [[ ${#r} -gt 0 ]]; then