On Wed, Feb 12, 2025 at 07:13:21PM +0500, Andrey Rakhmatullin wrote:
> On Wed, Feb 12, 2025 at 10:59:14AM -0300, Antonio Terceiro wrote:
> > > Apparently the proxy check added in 15.2 doesn't work for me. Note that
> > > detect_apt_cacher_ng() (called for localhost etc.) greps for 406 while 
> > > hit()
> > > doesn't. Additionally, it looks like "-o 
> > > "Acquire::http::Proxy::${ip}=DIRECT""
> > > in the former may be needed to avoid "403  Configuration error (confusing 
> > > proxy
> > > mode) or prohibited port (see AllowUserPorts)" when running 
> > > /usr/lib/apt/apt-
> > > helper as a user.
> > 
> > Yes, the avahi support is a bit tricky. Can you try the attached patch?
> > This would add a dependency on curl, but I guess if you alreday have the
> > avahi machinery installed, also having curl is not much of a problem.
> 
> > From dc2e46b620803ac12feeb6b95e5137643c863332 Mon Sep 17 00:00:00 2001
> > From: Antonio Terceiro <terce...@debian.org>
> > Date: Wed, 12 Feb 2025 10:57:12 -0300
> > Subject: [PATCH] Fix check for avahi proxy
> > 
> > ---
> >  auto-apt-proxy | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/auto-apt-proxy b/auto-apt-proxy
> > index 34cc1b6..670a853 100755
> > --- a/auto-apt-proxy
> > +++ b/auto-apt-proxy
> > @@ -204,7 +204,7 @@ detect_avahi_local() {
> >    local avahi_result proxy
> >    if avahi_result="$(_lookup_avahi_local)"; then
> >      proxy=$(_print_avahi_proxy "${avahi_result}")
> > -    if hit "${proxy}" >/dev/null 2>&1; then
> > +    if curl --silent --output /dev/null "${proxy}"; then
> >        echo "${proxy}"
> >      else
> >        return 1
> 
> 
> Yes, this works.

Hi, I'm about to upload 16.2 with some improvements in the avahi
support. Once that hits, it would be nice to know whether there is any
regression. I tested it myself quite a bit but it would be nice to have
someone else testing as well.

Attachment: signature.asc
Description: PGP signature

Reply via email to