[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [patch] Defining apt sources using codename instead of suite



On Monday 24 October 2005 22:39, Joey Hess wrote:
> Problem is that the duplicated code calls wget, so this will slow down
> every networked install as it downloads the Release file for a second
> time.

Yes, I know. The problem is that the first wget (in find_suite) may not be 
the same suite as the one that is selected in the end by the user, so it 
may not always be avoidable.
Also, my C skills are not up to rewriting the code so that the file(s) 
is/are saved somewhere on first read and can then be parsed from there 
(which would probably be the best alternative).

<pseudocode>
Read suite from saved Release file
If Release.suite == selected.suite
   Parse codename from saved Release file
Else
   wget <Release file for selected.suite>
   Parse codename from Release file
EndIf
</pseudocode>

> There is also existing code in base-installer to determine the
> codename, based on the suite. Yes, it downloads the Release file yet
> again.

Well, if we can get rid of downloads of the release file there, the net 
effect would be null... Also, the release file is quite small, so the 
loss is not that big anyway.

> So if choose-mirror, cdrom-detect, and iso-scan only stored the
> codename, then base-installer could be simplified, net-retriever, and
> cdrom-retriever could use it without other changes (the codename links
> would become required on CDs and mirrors but AFAIK they're already
> there), and of course apt-setup would change to using the codename in
> sources.list.

Ack. That would be the next stage.

> Nothing needs the suite if you switch to using only codenames.

Hmmm. We still use the suites for asking which suite to install in 
choose-mirror. Otherwise we'd have to get the codenames (and thus all 
Release files) for all suites and build the choices list at runtime.

Attachment: pgpIPJxcI2Byk.pgp
Description: PGP signature


Reply to: