Neil Williams <[EMAIL PROTECTED]> writes: > On Wed, 04 Apr 2007 10:47:00 +0200 > Goswin von Brederlow <[EMAIL PROTECTED]> wrote: > >> Parse sources.list. Many people have multiple suites in there and you >> will want to add multiple entries then. > > apt-cache policy already covers that output and it is easier to parse - > the code offered by Ben Hutchings adds to my own code by supporting the > priority figure specified in apt-cache policy, I was already parsing > the rest. Thanks Ben.
But it lacks information: % apt-cache policy Package files: 100 /var/lib/dpkg/status release a=now 500 http://storage sid/non-free Packages release o=Debian,a=unstable,l=Debian,c=non-free origin ftp.de.debian.org 500 http://storage sid/contrib Packages release o=Debian,a=unstable,l=Debian,c=contrib origin ftp.de.debian.org 500 http://storage sid/main Packages release o=Debian,a=unstable,l=Debian,c=main origin ftp.de.debian.org Now is that http://storage/debian/sid/main/binary-amd64/Packages or http://storage/mirror/debian/sid/main/binary-amd64/Packages ? You just don't have all the info. >> You also want to pick a mirror >> near to the mirror already used. > > That won't work - the only reason to add a primary mirror is when the > system is not using ANY primary mirrors, just something like > ftp.debian.org as set by debootstrap. Ah, then I misunderstood what you add and when. > Am I right in thinking that normal d-i installations ensure that at > least one primary mirror is selected (or at least strongly advise that > one primary should exist)? Nothing wrong with picking ftp.debian.org from the mirror list if one is in us. D-I takes the full list, filters out mirrors that carry the requested arch and then tries to pick one from the country the locales are set to. Otherwise the user gets asked to pick one afaik. So nothing says the mirror you end up with on i386 will have arm packages. > I will look at 'ucf' to manage the file in /etc/apt/sources.list.d/ > - as you suggested. However, if no primary mirror needs to be added > to /etc/apt/sources.list.d/emdebian.sources.list, I'm not sure ucf is > necessary - ucf isn't relevant in a debootstrap chroot. Ucf is neccessary (not strictly speaking but it is a very good idea) whenever you generate a conffile instead of shipping a premade file in the package. If you have the option of having a primary mirror or an empty file then you can't ship the file. So ucf becomes your friend. > Options, options . . . MfG Goswin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]