ubuntu remapping does not work

Bug #225485 reported by Rolf Leggewie
4
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: apt-cacher-ng

remapping to the ubuntu repository does not work in the hardy version. It does work in the latest version in debian (available for hardy in my ppa)

Revision history for this message
Brian Pitts (bpitts) wrote :

I can confirm that this does not work. In acng.conf there is "Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu", where ubuntu_mirrors contains a list of ubuntu mirrors and backends_ubuntu is empty. When you download from two different mirrors, two different directories, named for the mirror, appear in /var/cache/apt-cacher-ng. The expected behavior is for both their files to go in /car/cache/apt-cacher-ng/uburep. The documentation in /usr/share/doc/apt-cacher-ng/html/config-serv.html is too unclear for me to figure out if the problem is due to misconfiguration.

Revision history for this message
Brian Pitts (bpitts) wrote :

Purging and installing the package for intrepid fixed the problem.

Rolf Leggewie (r0lf)
Changed in apt-cacher-ng:
status: New → Triaged
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

backends_* file is generated during package installation/setup by looking at the contents of your sources.list file. There should be no need to purge the package either, just reconfigure it. See README.Debian for details.

Revision history for this message
Brian Pitts (bpitts) wrote :

The backends_ubuntu file wasn't built when I installed the package in hardy.

Is a backend specification necessary for remapping to work? From config-serv.html: "The last part of the Remap-... directive, appended after a semicolon, describes locations to download from. This part is optional if the first part contains only real locations and mandatory if shortcuts are used there." The first part contains only real locations, so I would expect it to download from any of those locations and store the result in uburep. I would only think to specify a backend if I wanted it to only download from one external repository regardless of the actual mirror requested.

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

First: the backends list is optional. If it's empty then the originally requested mirror is used to download from.

Second: if your current mirrors are not listed in the mirrors list (here: file ubuntu_mirrors) then the requests won't be mapped to this configuration, thus original sources will be used for download and files are stored at different locations.

Please check that your mirrors are really listed there. If yes, then there is a real bug. If no, then the mirrors list needs to be reviewed. I don't have time to track https://wiki.ubuntu.com/Mirrors and the entries there are not really consistent. My convert script either filters too much, or let's to many incorrect paths slip through.

Revision history for this message
Brian Pitts (bpitts) wrote :

When I experienced the buggy behaviour using the hardy package, my mirror was http://mirror.anl.gov/pub/ubuntu/ . This is in ubuntu_mirrors.

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Hello,

no good idea yet, cannot reproduce with current version (below) and there are no relevant changes since hardy version, AFAICS. Please show output of:

apt-get update --print-uris

Test:
$ http_proxy=http://localhost:3142 wget http://mirror.anl.gov/pub/ubuntu/dists/hardy/Release.gpg
--2008-05-12 14:21:10-- http://mirror.anl.gov/pub/ubuntu/dists/hardy/Release.gpg
Auflösen des Hostnamen »localhost«.... 127.0.0.1, ::1
Verbindungsaufbau zu localhost|127.0.0.1|:3142... verbunden.
Proxy Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 191 [application/octet-stream]
In »Release.gpg« speichern.

100%[==========================================================================================================================================================================>] 191 --.-K/s in 0s

2008-05-12 14:21:10 (10,9 MB/s) - »Release.gpg« gespeichert [191/191]

$ ls -la /var/cache/apt-cacher-ng/uburep/dists/hardy/Release.gpg
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 191 12. Mai 14:21 /var/cache/apt-cacher-ng/uburep/dists/hardy/Release.gpg

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I have to say that I am happy it works for me now and have not looked into it any further. I will admit that I found the description of how things were supposed to work and be set up so difficult to understand that I gave up almost instantly and just tried whether using the latest debian version recompiled for hardy would fix it. That was the case.

My understanding is now that apt-cacher-ng looks at the sources.list file for the computer where it runs and extracts some information there to put in backends_* While I don't completely understand why that is necessary, I wonder if this will work as expected in a LAN environment where apt-cacher-ng serves a number of machines with possibly different distros and mirrors (all deb-based, of course).

The mirror I use is ubuntu.intergenia.de.

Again, this seems to be fixed for both Brian and me with the post-hardy version, so everything is cool with me, at least.

Revision history for this message
Brian Pitts (bpitts) wrote :

Eduard, I know it works in the latest release, please purge that and try the version shipping with Hardy. On a fresh box running Hardy I just installed apt-cacher-ng 0.1.9-1, ran http_proxy=http://localhost:3142 wget http://mirror.anl.gov/pub/ubuntu/dists/hardy/Release.gpg, and the file was cached in /var/cache/apt-cacher-ng/mirror.anl.gov/pub/ubuntu/dists/hardy/Release.gpg

Revision history for this message
Rolf Leggewie (r0lf) wrote :

It is working in the development release of Ubuntu which is enough for me. If anybody thinks this needs to be backported to hardy, please nominate this ticket for the appropriate release.

Changed in apt-cacher-ng (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.