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

Re: boot floppies 2.2.0 expected within 72 hours



Joey Hess <joey@kitenet.net> writes:

[...]

> 	db_get aptconf/country
> 	if [ "$RET" != "enter information manually" ]; then
> 		# Now come up with a list of mirrors in the selected country.
> 		# It is ordered with push mirrors at top.
> 		MIRRORS=`perl -ne '
> 			BEGIN { $/="\n\n"; $type=shift; $country=shift }
> 			if (/Archive-$type:/ && /Country: $country\s*\n/) {
> 				($s)=/Site: (.*?)\n/;
> 				($t)=/Type: (.*?)\n/;
> 				$rating=0;
> 				$rating=1 if $t=~/push/i;
> 				$rating=2 if $t=~/push-primary/i;
> 				$mirrors{$s}=$rating;
> 			}

If we can have netselect available, I think we should use it to
put the available mirrors in order, perhaps after grouping them
by mirror type.  Then tell the user to select the first one 
of the desired type unless s/he knows better (and in CRITICAL mode, 
just do it).

> 			END { print join(", ", 
> 				sort { $mirrors{$b} <=> $mirrors{$a} }
> 				(keys %mirrors)) }
> 		' $URI "$RET" $MIRRORLIST`
> 		db_subst aptconf/mirror mirrors "$MIRRORS"
> 		db_input critical aptconf/mirror
> 		db_go

[...]






Reply to: