ERROR with invocation of apt-get update

Michael Tautschnig mt at debian.org
Fri Sep 5 14:48:50 CEST 2008


[...]
> 
> So I dived into the problem and found out that, when FAI install apt on
> the /target it copies all the files recursivelly from /etc/apt/* from
> the nfsroot to the target drive which is exactly the intended
> behaviour... With one exception... Somehow somewhere it also created a
> one-liner sources.list file with the content of what I presume being the
> content of FAI_DEBOOTSTRAP variable from the make-fai-nfsroot.conf.  I
> think this file gets created when there is no default sources.list file
> in the nfsroot or something similar (I'm using sources.list.d/*.list
> files) .... What happends is that this one liner apt depot is a
> duplication of one of my configuration located under the
> sources.list.d/*.list files so APT hang due to a duplicate channel.  It
> actually hang often but not always...
> 
The contents of /etc/apt/ in the nfsroot should be solely determined by the
contents of /etc/fai/apt/ on your server, so you might want to check that.

> To confirm this I've created a small patch to the
> usr/lib/fai/subroutines-linux:
> 
> --- subroutines-linux   2008-09-04 08:31:52.000000000 -0400
> +++ subroutines-linux.NEW       2008-09-04 08:31:25.000000000 -0400
> @@ -236,6 +236,10 @@ EOF
>      # during normal installation, we need sources.list from /etc/apt
>      [ $do_init_tasks -eq 1 ] && FAI_ETC_DIR=/etc
>      [ -d $FAI_ETC_DIR/apt ] && cp -r $FAI_ETC_DIR/apt/*
> $FAI_ROOT/etc/apt/
> +    # If there are sources.list.d/*.list files then remove the
> +    # fai-created default sources.list in order to avoid conflicts
> +    [ "`ls -1 $FAI_ROOT/etc/apt/sources.list.d/*.list 2>/dev/null`" ] \
> +         && rm -f $FAI_ROOT/etc/apt/sources.list
>  }
>  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>  task_updatebase() {
> 
> 
> This seems to solve the problem.... Although the original problem in my
> opinion is that it should create that sources.list file not only when it
> does not exist but also conditionnally with: does any *.list file exists
> in the sources.list.d/ directory?  Although I have'nt found where it
> does that just yet.
> 
> Anyhow, this patch completelly solves my problem for now.. I'm now
> wondering if this fix could be included in the next release (or the
> other approach of not creating the sources.list file conditionnally to
> the existence of sources.list.d/*.list files).
> 

I couldn't find any point where such a source.list file is created either. I'd
only see one possible point: Assuming that /etc/fai/apt/ has such a
sources.list.d layout as well on your site, the initial call to debootstrap for
building the nfsroot may leave behind that sources.list. If you could confirm
this behaviour, I'd opt for rather patching make-fai-nfsroot: It should clean
out /etc/apt in the nfsroot before copying /etc/fai/apt/. Thomas, would that
make sense?

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20080905/c9ebbaf0/attachment.bin 


More information about the linux-fai mailing list