- if apt is truly restricted to just a single executable name in that parameter, maybe the package could ship a small wrapper script that conditionally runs /apt-avahi-discover if it exists, with the wrapper script placed somewhre in /etc, so it's not removed on purge, e.g.
with /etc/squid-deb-proxy-client/apt-avahi-discover containing
# you're not expected to modify this, see LP: #1501217
if [ -x /usr/share/squid-deb-proxy-client/apt-avahi-discover ]; then /usr/share/squid-deb-proxy-client/apt-avahi-discover
fi
I keep not finding the time to experiment and see if one of the first two ideas would work. I don't like the 3rd option.
I've some half-formed ideas:
- if apt allows a shell command instead of just an executable name, maybe the config could be
Acquire: :http:: ProxyAutoDetect "if [ -x /usr/share/ squid-deb- proxy-client/ apt-avahi- discover ]; then /usr/share/ squid-deb- proxy-client/ apt-avahi- discover; fi";
- if apt doesn't use the shell, but allows a command with arguments, and not just an executable name, maybe the config could be
Acquire: :http:: ProxyAutoDetect "sh -c 'if [ -x /usr/share/ squid-deb- proxy-client/ apt-avahi- discover ]; then /usr/share/ squid-deb- proxy-client/ apt-avahi- discover; fi'";
- if apt is truly restricted to just a single executable name in that parameter, maybe the package could ship a small wrapper script that conditionally runs /apt-avahi-discover if it exists, with the wrapper script placed somewhre in /etc, so it's not removed on purge, e.g.
Acquire: :http:: ProxyAutoDetect "/etc/squid- deb-proxy- client/ apt-avahi- discover" ;
with /etc/squid- deb-proxy- client/ apt-avahi- discover containing
# you're not expected to modify this, see LP: #1501217 squid-deb- proxy-client/ apt-avahi- discover ]; then
/usr/share/ squid-deb- proxy-client/ apt-avahi- discover
if [ -x /usr/share/
fi
I keep not finding the time to experiment and see if one of the first two ideas would work. I don't like the 3rd option.