diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-11-13 19:47:28 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-11-13 20:42:07 +0000 |
commit | e28378588618f059545db785b442ab3c8b92c5ce (patch) | |
tree | f91098c61d5a8c362ba8624513c33c8e0746ecc8 | |
parent | fe135b820483b369b51c9dbf860793289a51811d (diff) | |
download | qarepo-e28378588618f059545db785b442ab3c8b92c5ce.tar qarepo-e28378588618f059545db785b442ab3c8b92c5ce.tar.gz qarepo-e28378588618f059545db785b442ab3c8b92c5ce.tar.bz2 qarepo-e28378588618f059545db785b442ab3c8b92c5ce.tar.xz qarepo-e28378588618f059545db785b442ab3c8b92c5ce.zip |
Only accept limited abbreviations of full package names.
Automatically add the arch/noarch and .rpm extension, but don't allow
incomplete or missing version numbers. We have wildcards and fuzzy
versions for that.
-rw-r--r-- | qarepo.pl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -547,7 +547,7 @@ sub sync_repo { my $pattern = wildcard_to_regexp($request); my $matched = 0; foreach my $candidate (keys %rpm_dependencies) { - if ($candidate =~ /^$pattern/) { + if ($candidate =~ /^($pattern)((\.($arch|noarch))?\.rpm)?$/) { $selection{$candidate} = 1; $selection{$_} ||= 2 foreach keys %{$rpm_dependencies{$candidate}}; $matched = 1; |