Debian Bug report logs - #576634
live-helper: Try to guess the user's preferred mirror from sources.list.

version graph

Package: live-helper; Maintainer for live-helper is Debian Live Project <debian-live@lists.debian.org>;

Reported by: Daniel Burrows <dburrows@debian.org>

Date: Tue, 6 Apr 2010 03:51:01 UTC

Severity: normal

Tags: patch

Found in version live-helper/2.0~a9-1

Done: Daniel Baumann <daniel@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Live <debian-live@lists.debian.org>:
Bug#576634; Package live-helper. (Tue, 06 Apr 2010 03:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Live <debian-live@lists.debian.org>. (Tue, 06 Apr 2010 03:51:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: live-helper: Try to guess the user's preferred mirror from sources.list.
Date: Mon, 5 Apr 2010 20:21:25 -0700
[Message part 1 (text/plain, inline)]
Package: live-helper
Version: 2.0~a9-1
Severity: normal
Tags: patch

  I noticed that live-helper defaults to using a mirror in Germany.  It seems like
it would be better to use the same mirror that the user's system is taking its
packages from.  Obviously we can't know that in general (well, except for copying
sources.list, but that has its own issues), but in the common case, Debian systems
get their apt sources from a mirror that looks like this:

deb http://http.XX.debian.org/debian(... more stuff)

  I suggest just taking the first such line from sources.list and using it to
determine the mirror, and I've attached a patch (admittedly a bit ugly, but it
should illustrate what I mean) that uses grep and sed to acheive this goal.

  Daniel

-- Package-specific info:

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-helper depends on:
ii  debootstrap                   1.0.22     Bootstrap a basic Debian system

Versions of packages live-helper recommends:
ii  cpio                          2.11-1     GNU cpio -- a program to manage ar
ii  gettext-base                  0.17-10    GNU Internationalization utilities

Versions of packages live-helper suggests:
ii  dosfstools                 3.0.9-1       utilities for making and checking 
ii  fakeroot                   1.14.4-1      Gives a fake root environment
ii  genisoimage                9:1.1.10-1    Creates ISO-9660 CD-ROM filesystem
pn  memtest86+ | memtest86     <none>        (no description available)
ii  mtools                     4.0.12-1      Tools for manipulating MSDOS files
ii  parted                     2.2-3         The GNU Parted disk partition resi
pn  squashfs-tools | genext2fs <none>        (no description available)
ii  sudo                       1.7.2p5-1     Provide limited super user privile
ii  syslinux                   2:3.86+dfsg-1 utilities for the syslinux bootloa
pn  uuid-runtime               <none>        (no description available)
pn  win32-loader               <none>        (no description available)

-- no debconf information
[live-helper-infer-mirror.patch (text/x-diff, attachment)]

Reply sent to daniel@debian.org:
You have taken responsibility. (Tue, 06 Apr 2010 05:12:05 GMT) Full text and rfc822 format available.

Notification sent to Daniel Burrows <dburrows@debian.org>:
Bug acknowledged by developer. (Tue, 06 Apr 2010 05:12:05 GMT) Full text and rfc822 format available.

Message #10 received at 576634-done@bugs.debian.org (full text, mbox):

From: Daniel Baumann <daniel@debian.org>
To: Daniel Burrows <dburrows@debian.org>, 576634-done@bugs.debian.org
Subject: Re: Bug#576634: live-helper: Try to guess the user's preferred mirror from sources.list.
Date: Tue, 06 Apr 2010 06:59:06 +0200
On 04/06/2010 05:21 AM, Daniel Burrows wrote:
>    I noticed that live-helper defaults to using a mirror in Germany.  It seems like
> it would be better to use the same mirror that the user's system is taking its
> packages from.  Obviously we can't know that in general (well, except for copying
> sources.list, but that has its own issues),

since there is no general way of knowing what sources.list to use, and 
since even what is configured doesn't necessarily is the right one to 
use, and we get many people using screwed mirrors all the time already 
now, i really don't like to change that.

> but in the common case, Debian systems
> get their apt sources from a mirror that looks like this:
>
> deb http://http.XX.debian.org/debian(... more stuff)

fwiw, this might be true for XX equal us, but almost all primary mirrors 
are http://ftp.xx.

>    I suggest just taking the first such line from sources.list and using it to
> determine the mirror, and I've attached a patch (admittedly a bit ugly, but it
> should illustrate what I mean) that uses grep and sed to acheive this goal.

the idea of live-helper is to be able to bootstrap a clean debian (live) 
system, regardless how screwed up the host system is, as long as it has 
a shell and debootstrap|cdebootstrap. this, of course, also only works 
if the archive of the mirror we bootstrap from, is really reliable.

using a default mirror automatically which is, with relatively big 
chance, either broken or not the desired one, is very bad and would 
extremely burden the support requests and debug time for people with 
failing builds.

so it boils down to weighting, for the default case, on the one side the 
maybe slower but perfectly working mirror, and on the other side, the 
probably faster but unreliable mirror selection - and i clearly am for 
the first option here.

however, the real solution here would be to use cdn.debian.net once it 
has been turned into an official service. eventhough cdn.debian.net 
works quite well which is why we use it for binary mirrors, it's not 
reliable enough as a default setting for the bootstrap/chroot mirrors 
for the very similar reasons above.

hopefully, DSA will at some point setup cdn.debian.org and keep only 
primary or otherwise as reliable known mirrors in the rotation 
(cdn.debian.net has from time to time outdated or simply broken mirrors, 
but it's not so much of a problem for us since it only ends up in the 
image, but is not used during build time of the image). i'm more than 
happy to change the defaults once this has been setup, but in the 
meanwhile, for our own sake, i'm keeping the default as it is.

Regards,
Daniel

-- 
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 04 May 2010 07:34:33 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 10:13:53 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.