Package: dpkg
Version: git master
Severity: minor
In src/select.c in function setselections(...) (line 111 ff.) the for
loop (line 135-196) reads stdin line for line, increasing variable lno
whenever a newline is encountered. After having read package name and
selection, the cursor is already advanced after the next newline, but
the corresponding lno increase is not done until the end of the for loop
- apparently to be able to reference it. But if the condition line 182
to 186 is true, the program continues the for loop WITHOUT increasing
the line number, so the next line is reported with the same line number.
Solution: increase lno already after line 177 and reference lno-1
afterwards, remove line 195
Btw: I noticed this error running dpkg --setselections with hundreds of
packages that pkg_is_informative() reported false even though all are in
/var/lib/dpkg/available, and lots of them were reported on the same
line: bulks of "warning: package not in database at line xxx" with same xxx.