diff options
author | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2015-09-16 11:17:20 +0000 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2015-09-16 11:17:20 +0000 |
commit | 4a19b5434cb6cd968b91c9a5a6c855112ca61297 (patch) | |
tree | e601d3808d173988768ddf2d75869b99f3dbde87 /ports-mgmt/pkg_cutleaves | |
parent | cee10a44c861d886191cea797f2218026ed6e552 (diff) | |
download | ports-4a19b5434cb6cd968b91c9a5a6c855112ca61297.tar.gz ports-4a19b5434cb6cd968b91c9a5a6c855112ca61297.zip |
Notes
Diffstat (limited to 'ports-mgmt/pkg_cutleaves')
-rw-r--r-- | ports-mgmt/pkg_cutleaves/files/pkg_cutleaves | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports-mgmt/pkg_cutleaves/files/pkg_cutleaves b/ports-mgmt/pkg_cutleaves/files/pkg_cutleaves index e9f1660a835a..7e814ee9c2a5 100644 --- a/ports-mgmt/pkg_cutleaves/files/pkg_cutleaves +++ b/ports-mgmt/pkg_cutleaves/files/pkg_cutleaves @@ -286,7 +286,7 @@ sub set_excl_pattern { $exclpattern = @excludes ? join('|', map{qr(\Q$_\E)} @excludes) : ' '; # default non-exclusive - $exclpattern = qr{^($exclpattern)}o; + $exclpattern = qr{^($exclpattern)$}o; } # @@ -317,7 +317,7 @@ sub get_excludelist { # sub get_packages { my @pkgs; - open(PKGQUERY, '-|', @pkgquery, '-a', '%n-%v\t%?r\t%c') + open(PKGQUERY, '-|', @pkgquery, '-a', '%n\t%n-%v\t%?r\t%c') or die "Couldn't read output from $pkgquery[0]!"; while (my $p = <PKGQUERY>) { chomp($p); @@ -334,9 +334,9 @@ sub get_leaves { my %leaves; my @pkgs = get_packages(); foreach my $pkg (@pkgs) { - my ($file, $required, $comment) = @$pkg; + my ($name, $file, $required, $comment) = @$pkg; unless ($required) { - if ($file =~ $exclpattern) { + if ($name =~ $exclpattern) { $leavestokeep{$file} = 1; } else { |