/etc/apt-cacher-ng/backends_debian should have a default entry for debian

Bug #557316 reported by João Pinto on 2010-04-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)

Bug Description

Binary package hint: apt-cacher-ng

I am using apt-cacher-ng for an schroot based build system, I need to create both ubuntu an debian chroots, thus using debian and ubuntu apt sources.
After a clean install on ubuntu the file /etc/apt-cacher-ng/backends_debian is empty rendering requests fr /debian/* sources impossible.
IMO the default /etc/apt-cacher-ng/backends_debian should contain http://ftp.debian.org/debian .

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: apt-cacher-ng 0.4.6-1
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic
Uname: Linux 2.6.32-19-generic i686
Architecture: i386
Date: Wed Apr 7 14:47:48 2010
 PATH=(custom, user)
SourcePackage: apt-cacher-ng

João Pinto (joaopinto) wrote :
Rolf Leggewie (r0lf) wrote :

This seems to happen to work fine for me. But my installation has grown over the years. Could be that a clean install has some issues.

Eduard Bloch (blade) wrote :

Uhm, adding ftp.debian.org as fall-back means that it always points to the same machine instead of a local mirror. Doesn't make sense if you ask me.

What I could do is some cheating: take the .../ubuntu/... URL from sources.list as example, replace "ubuntu" strings with "debian" and look whether it matches some Debian mirror location. Does this sound acceptable?

João Pinto (joaopinto) wrote :

those which are aware that there is a local Debian mirror will be able to change the mirror later.

I am not sure that searching for a debian mirror on ubuntu archive will work for most of the mirrors. When there is a country code on the archive it could be translated to a debian one (http://www.debian.org/mirror/list).
Anyway I don't think using ftp.debian.org as the default hostname will be a real problem, I don't expect a massive number of people on Ubuntu installing packages from Debian. If there was some concern with load on ftp.debian.org I guess it would have some load distribution scheme.


CarstenHey (c.hey) wrote :

Using geodns for ftp.debian.org would avoid raising the load of one server if ftp.debian.org is used as fallback. I asked DSA if using geodns for ftp.debian.org is planned and they responded with "no".

Nevertheless, I think using a fallback that is used just before "debrep" is resolved is preferable to bothering users by sending problem reports per mail. This fallback would only be used if the user doesn't configure apt-cacher-ng manually and chooses to skip automatic configuration in the debconf question or if apt-cacher-ng on ubuntu is used as cache for debian packages (or vice versa).

One idea you had was "if backend file foo is empty try foo.default in the same directory", I think this would be a very sane solution. You also suggested to put ftp.debian.org into the file backends_debian.default.

Just for clarification: ftp.debian.org is as far as I know a mirror like every other mirror and not some kind of "debian main mirror", a quick look at the ftpsync scripts seems to confirm this. Please ask ftpmaster if this is relevant for your decision and if you want to be sure. They might also have an opinion whether ftp.debian.org is the best fallback mirror of apt-cacher-ng.

Eduard Bloch (edi-gmx) wrote :

This is supposed to be fixed in 0.4.8, test packages: https://www.unix-ag.uni-kl.de/~bloch/acng/ubuntu/

João Pinto (joaopinto) wrote :

There is no 0.4.8 on that link :)

Eduard Bloch (edi-gmx) wrote :

Heh, I shouldn't look in the dev branch when looking for the version. Try 0.4.7 ;-)

João Pinto (joaopinto) wrote :

0.4.7 does not fix it :(

Eduard Bloch (edi-gmx) wrote :

Really? I just nuked the backends_debian file and after restart of acng... it still worked, just as requested in this task!

Could you try something? Put "Debug=5" into the first line (!) of acng.conf and restart with the init script. And show the output. Mine is:

# /etc/init.d/apt-cacher-ng restart
Restarting apt-cacher-ng: apt-cacher-ngReading rewrite file: /etc/apt-cacher-ng/deb_mirrors.gz
created empty backend entry for debrep
Reading backend file: /etc/apt-cacher-ng/backends_debian
No backend data found, file ignored.
Trying to read replacement from /etc/apt-cacher-ng/backends_debian.default
Reading backend file: /etc/apt-cacher-ng/backends_debian.default
Reading rewrite file: /etc/apt-cacher-ng/ubuntu_mirrors
created empty backend entry for uburep
Reading backend file: /etc/apt-cacher-ng/backends_ubuntu
No backend data found, file ignored.
Trying to read replacement from /etc/apt-cacher-ng/backends_ubuntu.default
Reading backend file: /etc/apt-cacher-ng/backends_ubuntu.default
Reading rewrite file: /etc/apt-cacher-ng/debvol_mirrors.gz
created empty backend entry for debvol
Reading backend file: /etc/apt-cacher-ng/backends_debvol

Additional debugging information not compiled in.

Rolf Leggewie (r0lf) on 2010-09-15
Changed in apt-cacher-ng (Ubuntu):
status: New → Incomplete
João Pinto (joaopinto) wrote :

It does work now.

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

Other bug subscribers