Browse Source

Use dpkg-query to list packages, rather than parsing the status file. Closes: #657389

tags/3.08
Joey Hess 9 years ago
parent
commit
af21391119
2 changed files with 8 additions and 6 deletions
  1. +4
    -0
      debian/changelog
  2. +4
    -6
      tasksel.pl

+ 4
- 0
debian/changelog View File

@@ -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 <bubulle@debian.org> Mon, 05 Dec 2011 21:29:17 +0100

tasksel (3.07) unstable; urgency=low


+ 4
- 6
tasksel.pl View File

@@ -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;
}



Loading…
Cancel
Save