aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-13 19:47:28 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-13 20:42:07 +0000
commite28378588618f059545db785b442ab3c8b92c5ce (patch)
treef91098c61d5a8c362ba8624513c33c8e0746ecc8
parentfe135b820483b369b51c9dbf860793289a51811d (diff)
downloadqarepo-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.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/qarepo.pl b/qarepo.pl
index 6444253..abbae63 100644
--- a/qarepo.pl
+++ b/qarepo.pl
@@ -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;