From 10c11e4e5d4ce88933754e9ab2d118aba0996962db1ea03745337d15b1b12bed Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 14 Jun 2017 14:12:41 +0000 Subject: [PATCH] Accepting request 503703 from home:kraih The package "perl-Task-Kensho-ModuleDev" is currently not installable because there's a dependency on "perl(Dist::Zilla)" that can't be resolved. The reason is that the module Dist::Zilla uses a new way to declare its version as part of the package name "package Dist::Zilla 6.009;", and that the perl.prov script can't understand yet. This patch adds support for that and a few more new package statement variations. OBS-URL: https://build.opensuse.org/request/show/503703 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=394 --- perlprov-package.diff | 26 ++++++++++++++++++++++++++ rpm.changes | 7 +++++++ rpm.spec | 3 ++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 perlprov-package.diff diff --git a/perlprov-package.diff b/perlprov-package.diff new file mode 100644 index 0000000..8217578 --- /dev/null +++ b/perlprov-package.diff @@ -0,0 +1,26 @@ +Support package statements like "package 1.2.3;" and "package 1.2.3 {", which are +new in Perl 5.12 and 5.14 + +--- ./scripts/perl.prov.orig 2017-06-09 15:20:11.869617486 +0200 ++++ ./scripts/perl.prov 2017-06-09 15:04:59.840952250 +0200 +@@ -129,9 +129,9 @@ + # package name so we report all namespaces except some common + # false positives as if they were provided packages (really ugly). + +- if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { ++ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*(?:v?([0-9_.]+)\s*)?[;{]/) { + $package = $1; +- undef $version; ++ $version = $2; + if ($package eq 'main') { + undef $package; + } else { +@@ -139,7 +139,7 @@ + # the package definition is broken up over multiple blocks. + # In that case, don't stomp a previous $VERSION we might have + # found. (See BZ#214496.) +- $require{$package} = undef unless (exists $require{$package}); ++ $require{$package} = $version unless (exists $require{$package}); + } + } + diff --git a/rpm.changes b/rpm.changes index 5ad1109..5e2ac69 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 9 15:33:01 UTC 2017 - sriedel@suse.com + +- Add patch to handle newer package statement variations for Perl + 5.12+ + * perlprov-package.diff + ------------------------------------------------------------------- Mon Apr 10 14:25:07 UTC 2017 - fvogt@suse.com diff --git a/rpm.spec b/rpm.spec index 8447c34..419f6ec 100644 --- a/rpm.spec +++ b/rpm.spec @@ -145,6 +145,7 @@ Patch100: rpm-findlang-inject-metainfo.patch Patch101: nobfd.diff Patch102: emptymanifest.diff Patch103: find-lang-qt-qm.patch +Patch104: perlprov-package.diff Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -240,7 +241,7 @@ rm -f rpmdb/db.h %patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 %patch -P 80 -P 81 -P 82 -P 83 -P 85 %patch -P 92 -P 93 -P 94 -P 96 -P 98 -P 99 -%patch -P 100 -P 101 -P 102 -P 103 +%patch -P 100 -P 101 -P 102 -P 103 -P 104 %ifarch aarch64 ppc64le %patch6464