Package: netselect-apt
Version: 0.3.ds1-5
Severity: normal
Tags: patch
According to this: " http://ftp.debian.org/README.non-US ", the non-us
repository is now useless for Debian releases older than 3.1 (actually
netselect-apt generate non-us entry by default).
I've put a little patch wich could fix the problem.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-ck3
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages netselect-apt depends on:
ii netselect 0.3.ds1-5 Choose the fastest server automati
ii wget 1.10-3+1.10.1beta1 retrieves files from the web
netselect-apt recommends no packages.
-- no debconf information
--- netselect-apt.orig 2005-08-03 04:11:16.000000000 +0200
+++ netselect-apt 2005-08-03 04:11:24.000000000 +0200
@@ -29,6 +29,7 @@
outfile="sources.list"
distro="stable"
want_nonfree=${WANT_NONFREE:-0}
+want_nonus=0
protocol="HTTP"
url="http://www.debian.org/mirror/mirrors_full"
@@ -102,6 +103,11 @@
*) log "Invalid distribution: $1"; exit 1 ;;
esac
+# look if we need a non-US entry (only for Debian release prior to 3.1)
+if [ "$distro" = "woody" ]; then
+ want_nonus=1
+fi
+
# netselect starting
log "Using distribution $distro."
@@ -140,15 +146,17 @@
log
fi
-log "Choosing a non-US Debian mirror using netselect."
-non_us=$(run_netselect "Non-US packages over $protocol" $protocol)
-if [ -z "$non_us" ]; then
- netselect_error
- exit 2
-else
- log "The fastest non-US server seems to be:"
- log " $non_us"
- log
+if [ $want_nonus -eq 1 ]; then
+ log "Choosing a non-US Debian mirror using netselect."
+ non_us=$(run_netselect "Non-US packages over $protocol" $protocol)
+ if [ -z "$non_us" ]; then
+ netselect_error
+ exit 2
+ else
+ log "The fastest non-US server seems to be:"
+ log " $non_us"
+ log
+ fi
fi
log "Writing $outfile."
@@ -171,15 +179,17 @@
fi
echo "deb-src $main $distro $sections"
- echo
- echo "# the non-US Debian packages."
- echo "deb $non_us $distro/non-US $sections"
- echo "# Uncomment the deb-src line if you want 'apt-get source'"
- echo "# to work with most non-US packages"
- if [ "$want_sources" -eq 0 ]; then
- echo -n "# "
+ if [ $want_nonus -eq 1 ]; then
+ echo
+ echo "# the non-US Debian packages."
+ echo "deb $non_us $distro/non-US $sections"
+ echo "# Uncomment the deb-src line if you want 'apt-get source'"
+ echo "# to work with most non-US packages"
+ if [ "$want_sources" -eq 0 ]; then
+ echo -n "# "
+ fi
+ echo "deb-src $non_us $distro/non-US $sections"
fi
- echo "deb-src $non_us $distro/non-US $sections"
) > $outfile
echo "Done."