Skip to content

Commit

Permalink
fix listinstalled for debian
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 8, 2014
1 parent 8369afd commit f313e08
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Build/Deb.pm
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,8 @@ sub queryinstalled {
local *F;
if (open(F, '<', "$root/var/lib/dpkg/status")) {
my $ctrl = '';
my $nl;
while(<F>) {
if ($_ eq "\n" && $nl) {
if ($_ eq "\n") {
my %res = control2res($ctrl);
if (defined($res{'PACKAGE'})) {
my $data = {'name' => $res{'PACKAGE'}};
Expand All @@ -433,11 +432,9 @@ sub queryinstalled {
push @pkgs, $data;
}
$ctrl = '';
undef $nl;
next;
}
$ctrl .= $_;
$nl = 1 if $_ eq "\n";
}
close F;
}
Expand Down

0 comments on commit f313e08

Please sign in to comment.