From a9068def673ffce9ae2c96eeb3961f6e5e5f473b Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 30 Jun 2019 10:09:42 -0700 Subject: [PATCH] It's always a source version if the package is a source package --- Debbugs/Collection/Version.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Debbugs/Collection/Version.pm b/Debbugs/Collection/Version.pm index 5f7c41f..f461afe 100644 --- a/Debbugs/Collection/Version.pm +++ b/Debbugs/Collection/Version.pm @@ -89,12 +89,11 @@ sub _member_constructor { for my $pkg_ver_arch (make_list($args{versions})) { my ($pkg,$ver,$arch) = $pkg_ver_arch =~ m{^([^/]+)/([^/]+)/?([^/]*)$} or confess("Invalid version key: $pkg_ver_arch"); + if ($pkg =~ s/^src://) { + $arch = 'source'; + } if (not length $arch) { - if ($pkg =~ /^src:/) { - $arch = 'source'; - } else { - $arch = 'any'; - } + $arch = 'any'; } if ($arch eq 'source') { push @return, -- 2.39.2