Bug#657389: Tasksel is to blame
Jurij Smakov wrote: I noticed that as well with today's dailies. This is displayed by tasksel, installer just invokes it in /target. I can also reproduce it on an installed system by running 'tasksel -t'. Since I can't reproduce this, I can only guess. tasksel contains a sub list_installed() that parses /var/lib/dpkg/status. Perhaps something about the status file format has changed? Parsing the file is a bit gratuitous, so I've attached a patch that switches it to dpkg-query. Does it fix the issue? -- see shy jo From af213911196f47c4cbe3fb0ba9f54999a32f9684 Mon Sep 17 00:00:00 2001 From: Joey Hess j...@kitenet.net Date: Sun, 29 Jan 2012 02:26:33 -0400 Subject: [PATCH] Use dpkg-query to list packages, rather than parsing the status file. Closes: #657389 --- debian/changelog |4 tasksel.pl | 10 -- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index ff17af3..1e81501 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,10 @@ tasksel (3.08) UNRELEASED; urgency=low - Add ibus-gtk3 to task-korean-gnome-desktop - Replace ttf-* with fonts-* + [ Joey Hess ] + * Use dpkg-query to list packages, rather than parsing the status file. +Closes: #657389 + -- Christian Perrier bubu...@debian.org Mon, 05 Dec 2011 21:29:17 +0100 tasksel (3.07) unstable; urgency=low diff --git a/tasksel.pl b/tasksel.pl index d32c456..0b05d74 100755 --- a/tasksel.pl +++ b/tasksel.pl @@ -115,15 +115,13 @@ sub list_avail { # Returns a list of all installed packages. sub list_installed { my @list; - local $/=\n\n; - open (STATUS, $statusfile); - local $_; - while (STATUS) { - if (/^Status: .* installed$/m /Package: (.*)$/m) { + open (LIST, q{dpkg-query -W -f='${Package} ${Status}\n' |}); + while (LIST) { + if (/^([^ ]+) .* installed$/m) { push @list, $1; } } - close STATUS; + close LIST; return @list; } -- 1.7.8.3 signature.asc Description: Digital signature
Bug#657389: Tasksel is to blame
On Sun, Jan 29, 2012 at 02:26:54AM -0400, Joey Hess wrote: Jurij Smakov wrote: I noticed that as well with today's dailies. This is displayed by tasksel, installer just invokes it in /target. I can also reproduce it on an installed system by running 'tasksel -t'. Since I can't reproduce this, I can only guess. tasksel contains a sub list_installed() that parses /var/lib/dpkg/status. Perhaps something about the status file format has changed? Parsing the file is a bit gratuitous, so I've attached a patch that switches it to dpkg-query. Does it fix the issue? No, that does not help. I investigated a bit and I believe that the problem is in getdescriptions() function. In particular, it does the following while processing the output of apt-cache show task-${task}: my ($description)=/^Description-.*: (.*)$/m; ($description)=/^Description: (.*)$/m unless defined $description; This inadvertently catches the Description-md5 field (which is new, I guess?): # apt-cache show task-desktop | grep Description Description: Debian desktop environment Description-md5: 17cb4a1ed6025b48045cc576bf52317c # Best regards, -- Jurij Smakov ju...@wooyd.org Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#657389: Tasksel is to blame
reassign 657389 tasksel found 657389 3.07 thanks I noticed that as well with today's dailies. This is displayed by tasksel, installer just invokes it in /target. I can also reproduce it on an installed system by running 'tasksel -t'. Best regards, -- Jurij Smakov ju...@wooyd.org Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org