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

Re: Bug#50284: a better apt configuration method



On Tue, 16 Nov 1999, Joey Hess wrote:

> Unfortunatly, netselect isn't always going to be available. I'd love to use
> it.

How about this - unless there is some sort of forced randomness (ie
netselect) people are going to tend to choose the same site. People are
going to click their country go 'huh' and pick the top one most of the
time. This defeats the entire purpose of http.us which is to reasonably
balance the load around and provide some degree of redundency.

Unless given some overriding knowledge [netselect, ping, knowldge of local
topology, whatever] I would rather eveyone use http.us than make an
uniformed choice from the mirror list. We can grow http.us to quite a
large number of hosts if need be, we can't grow say ftp.debian.org.

> It's worth noting that the debian mirrors web page
> (http://www.debian.org/misc/README.mirrors) is ordered by country, and
> indeed I think that's why you include the country data in Mirrors.masterlist
> in the first place, right?

The ordering by country is to help people who are actually going to search
for a good mirror using ping.
 
> > Because apt-get won't work? If apt-cdrom doesn't run correctly with out
> > any options then apt-get has no hope of having normal operation. APT has
> > to be able to mount discs on its own!
 
> I'll talk to the boot-floppies folks and make sure new cd installs come with
> a fstab line for /cdrom. Unless I'm missing something, this will make
> apt-get work.

I think they know that..
 
> The reason I'm using --no-mount is because I don't want apt-cdrom to prompt
> for the cdrom to be inserted, since my own prompts already ask that that be
> done, and so the autoprobing can happen without user interaction.

Well, this still has problems. If you are going to do this then use
apt-config to get the CD mount point and CD mounting command from the
configuration file and use that. 

That effectively will emulate what APT does internally.

> True, removal would be a nice thing to have. I'd be happy to add it in the
> future.

I think a better way of probing a mirror for life should be used. Probably
what you should do is use
 apt-get -o APT::Get::List-Cleanup=false -o Dir::Etc::sourcelist=/tmp/foo update

> Ah yes I meant sources.list and I'm querying apt-config for that now.
> 
> Apt-cdrom dump doesn't seem to output a location of apt-get or apt-cdrom,
> and besides, I don't care where they are as long as they're in the path.

apt-config dump only outputs things that have been set, not all things are
settable. The proper use of apt-config is to set a default then use
apt-config to override it if the user has put a new entry in the config
file. 

For instance:

APTGET="apt-get"
set -e
RES=`apt-config shell APTGET Dir::Bin::apt-get"`
eval $RES

$APTGET foo

Is the proper way to get the APT binary. This is important if someone
chooses to put some kind of wrapper around APT.

> > Not loading the mirror list was a big one
> 
> That is truely strange. Where did you put it, and how did you modifiy the
> script and did it give error messages to stderr about it?

I put /tmp/Mirrors.masterlist in the variable at the top
 
> > it actually didn't seem to
> > notice when APT failed to update a site since it didn't give any message
> > just went back to the main screen
> 
> if ! apt-get update 2>$tempfile; then
> 	[ show tempfile ]
> 
> I don't see how this could fail to notices apt's return code. Do you? Are
> you sure apt failed?

Yes, it had a bad URL, not sure what could have gone wrong after that.
 
> > you know the sizes of some of your
> > dialogs randomly change sometimes when you visit?
> 
> Randomly? Debconf sizes the dialog to the text that is inside it.

I think I got an error dialog and when ok came back to the first dialog it
was definately much larger than it was at the start.

> > If you hit 'cancel' in
> > some of the dialogs it exits instead of logically returning to the start,
> 
> Which is logical is debatable..

In this case I was pretty darn surprised - I think it was prompting for a
ftp site or something.
 
> > probably a few more I forget. 
> 
> Well you said it "insisted in writing invalid urls", I still don't have
> details of that.

Oh yeah, when you don't have the mirror list their is a 'space' entry in
the site list if you pick that it creates an invalid url. I imagine it
also do this if there are syntax errors in the mirror list. Might want to
check that too.

Jason


Reply to: