Package: netselect-apt
Version: 0.3.ds1-10
Severity: grave
Justification: renders package unusable


I noticed after installing a new version of Debian Etch that netselect-apt 
fails with the message:

netselect was unable to find a mirror, this probably means that
you are behind a firewall and it is blocking traceroute.

It seems the Perl code within run_netselect() fails to parse the HTML of the 
Debian worldwide mirror sites page at http://www.debian.org/mirror/mirrors_full 
because that page no longer contains \n\n delimiters.

I resolved the problem by modifying run_netselect() to use "<br><br>" instead 
(highlighted):

run_netselect()
{
        SEARCH="$1"
    PROTO="$2"
    netselect -v -s 1 $(cat "$infile" \
        | perl -n -e '
            $/="<br><br>";
            while(<>){
              next if $_ !~ /Site:/;
              if( m@'"$SEARCH"':.*<a href="('"$PROTO"'://.*?)">@i ){
                    print("$1\n");
              }
            }') \
        | awk '{print $2}'
}

I also removed the check for Archive Architectures, since the phrase no longer 
appears on the page.  Perhaps this is needed, however?

I've attached a patch to this e-mail with the changes.  I created it with the 
following commands:

claude:~/tmp$ find old new
old
old/netselect-apt
new
new/netselect-apt

claude:~/tmp$ diff -Naur old new > netselect-apt.patch

Also, I noticed after patching netselect-apt that running netselect-apt 
occassionally fails due to negative values for netselect field host->num_out, 
but this is a bug for the netselect package, not netselect-apt .

Please let me know if you have any comments, questions, or concerns.

Sincerely,

Kevin


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages netselect-apt depends on:
ii  netselect                     0.3.ds1-10 Choose the fastest server automati
ii  wget                          1.10.2-2   retrieves files from the web

netselect-apt recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to