Antonio Terceiro wrote: >> if stdout=$(/usr/lib/apt/apt-helper srv-lookup _http._tcp."$(hostname >> --domain)") && > s/_http/_apt_proxy/ ?
Oops, yes. >> # The response came from apt-cacher or apt-cacher-ng or approx. >> grep -q -i "$tmpfile" -e '<title>Apt-cacher' -e >> '406.*usage.information' -e '<title>approx\s*server</title>' > > this duplicates the check for those servers, and will make adding new > ones error prone because we always need to remember to also include a > duplicate of the check here. we would need to decouple hitting the > server from detecting what it is to be able to reuse the detection part > here. I agree on both points. I added the "sanity check" tests in at the last minute. I'm still inclined to just skip them, because (IMO) it's pretty unlikely to have an _apt_proxy._tcp SRV RR that *isn't* for apt. (Also, at one site, I want to point the SRV RR at a regular squid instance.) > As you saw at the top of this message, I am removing the `patch` tag > because this is not an actual patch, and also because it clearly won't > work as described given the _http/_apt_proxy mismatch. Feel free to > readd it when you post an actual, tested patch. Please also include a > patch to the documentation. Fair enough. I'll do this if/when I get time.