diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-06-18 06:35:13 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-06-18 06:35:13 +0200 |
commit | 7118ffe16d97b2a589047408ea704133a3aa28ad (patch) | |
tree | 952b2d6a6b7668cb72883af11e3f8bdeefc52865 /lib/SlackBuild/Rc.pm | |
parent | 7606460cdd3f501a3f385c111e78444dae843ab1 (diff) | |
download | slackbuilder-7118ffe16d97b2a589047408ea704133a3aa28ad.tar.gz slackbuilder-7118ffe16d97b2a589047408ea704133a3aa28ad.tar.bz2 |
Improve package pattern matcher
* MANIFEST.SKIP: New file.
* lib/SlackBuild/Registry/Pattern.pm: Rewrite as a subclass of
SlackBuild::Pattern.
* lib/SlackBuild/Pattern.pm: New file. Abstract structured pattern class.
* lib/SlackBuild/Rc.pm: Update invocation of the lookup method
* lib/SlackBuild/Registry.pm (lookup): Take single argument.
* lib/SlackBuild/Registry/Backend/FS.pm (lookup): Take single argument.
Allow for arbitrary prefix in front of the version number (e.g.
btrfs-progs-v4.5.3.txz)
* t/regrec.t: Update.
Diffstat (limited to 'lib/SlackBuild/Rc.pm')
-rw-r--r-- | lib/SlackBuild/Rc.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SlackBuild/Rc.pm b/lib/SlackBuild/Rc.pm index 79ac033..022386a 100644 --- a/lib/SlackBuild/Rc.pm +++ b/lib/SlackBuild/Rc.pm @@ -26,7 +26,7 @@ sub resolve { $q{arch} = { -in => [ $self->builder->arch, 'noarch' ] } unless exists $q{arch}; my $pred = new SlackBuild::Registry::Pattern(%q); - if (my $rec = $reg->lookup($q{package}, $pred)) { + if (my $rec = $reg->lookup($pred)) { push @packages, $rec->filename; } else { push @unresolved, $pred->as_string; |