mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
ports-mgmt/pkg_cutleaves: Fix exclude list REGEXP
Submitted by: cejkar@fit.vutbr.cz
This commit is contained in:
parent
cee10a44c8
commit
4a19b5434c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397055
1 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue