Hi,

I've been having the same problems, also with the sarge version of
apt-proxy. The problem really seems to arise from compressed Packages
files.

The source[1] suggests that Release and Packages files have to be
"registered" by apt-proxy for some reason; when running apt-get update
through apt-proxy, it unfortunately only registers the Release file, not
the Packages.gz (as indicated through "REGISTERING PACKAGE" log
messages, missing for the Packages.gz file).

As a workaround, I've tried to download the uncompressed Packages file
manually through apt-proxy, but first only ended up with exceptions in
the apt-proxy log and an apt-proxy that was unresponsive to that
specific backend until a restart(, i.e., client connections hung).

Further investigation (trial & error.. <cough>) showed that it's the
order that's important; at first, the compressed Packages file has to be
requested, and (immediately?) after that the uncompressed. Surprisingly
enough, according to apt-proxy logs it "verify"s/uncompresses the
compressed Packages file then instead of downloading the full
uncompressed file (at least with .gz), then correctly registers it.

After apt-proxy had registered the Packages files of my backends,
apt-proxy-import finally worked. (It couldn't import some (few)
packages, though, but most of them were removed from the archive by then
or got imported on a second run (whyever).)

I'd be interested what other consequences (lack of) registering Packages
files has besides apt-proxy-import functionality -- should the
workaround be repeated once in a while for proper long-term apt-proxy
functionality?


Here's a shell script fragment that works around the lack of Packages
files registration for me as described above, using wget:

  for URL in \
    
http://localhost:9999/debian/dists/sarge/{main,contrib,non-free}/binary-i386/Packages
 \
    
http://localhost:9999/security/dists/sarge/updates/{main,contrib,non-free}/binary-i386/Packages
  do
    wget -nv -O /dev/null "$URL.gz" "$URL"
  done


Regards, Fabian

-- 

[1] /usr/lib/python2.3/site-packages/apt_proxy/packages.py line 125:

    class AptPackages:
    [...]
        def packages_file(self, uri):
    [...]
            if basename(uri)=="Packages" or basename(uri)=="Release":
                log.msg("REGISTERING PACKAGE:"+uri,'apt_pkg')

Attachment: signature.asc
Description: Digital signature

Reply via email to