Package: netselect-apt
Version: 0.3.ds1-28
Severity: important
Tags: patch

Dear Maintainer,

There is a bug in the netselect package that output some of the hosts
with negative value. There is logic in netselect-apt to detect it and it
works, but the logic to ignore those doesn't witch results in generatin
invalid file.
The problem is detected with regular expression on line 197: egrep '^ *-'
But the logic to remove those lines on line 200 doesn't account for the
whitespaces: sed -e '/^-/d' As a result the generated source.list file has the line: deb - stable main contrib which is invalid. The solution is to modify the sed call on line 200 to sed -e '/^ *-/d'

-- System Information:
Debian Release: 9.6
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages netselect-apt depends on:
ii netselect 0.3.ds1-28+b1
ii wget 1.18-5+deb9u2

Versions of packages netselect-apt recommends:
ii curl 7.52.1-5+deb9u8

Versions of packages netselect-apt suggests:
ii dpkg-dev 1.18.25

-- no debconf information


--- /tmp/netselect-apt  2019-01-30 15:58:18.105147031 +0200
+++ /usr/bin/netselect-apt      2019-01-30 15:58:29.689200937 +0200
@@ -197,7 +197,7 @@
        corruptedhosts=$(echo "$out" | egrep '^ *-')
        if [ $? -eq 0 ]; then
                log "Detected corrupt scores from bug in netselect: 
$corruptedhosts"
-               out=$(echo "$out" | sed -e '/^-/d')
+               out=$(echo "$out" | sed -e '/^ *-/d')
        fi
 
 

Reply via email to