From e19cb9de3c8965e6e493a32d6a94e0b0814fdd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Wed, 12 Oct 2016 15:11:04 +0200 Subject: Recognize exact version dependency operator
--- ...7934-version-requirement-with-was-ignored.patch | 56 ++++++++++++++++++++++ perl-CPAN.spec | 4 ++ 2 files changed, 60 insertions(+) create mode 100644 CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch diff --git a/CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch b/CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch new file mode 100644 index 0000000..468f50d --- /dev/null +++ b/CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch @@ -0,0 +1,56 @@ +From 20cdb1ffd8ac90e1ea41949d887b7bf27d855317 Mon Sep 17 00:00:00 2001 +From: Andreas Koenig <a...@cpan.org> +Date: Sat, 27 Aug 2016 17:45:46 +0200 +Subject: [PATCH] Bugfix #47934: version requirement with "==" was ignored +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- reason was that uptodateness was checked earlier and considered sufficient +- adding a check where the uptodateness check appears +- resolving with a warning that continues, we cannot downgrade anyway + +Signed-off-by: Petr Písař <ppi...@redhat.com> +--- + lib/CPAN/Distribution.pm | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm +index ac62b65..fa9300d 100644 +--- a/lib/CPAN/Distribution.pm ++++ b/lib/CPAN/Distribution.pm +@@ -2838,9 +2838,21 @@ sub unsat_prereq { + $CPAN::SQLite->search("CPAN::Module",$need_module); + } + $nmo = $CPAN::META->instance("CPAN::Module",$need_module); +- next if $nmo->uptodate; + $inst_file = $nmo->inst_file || ''; + $available_file = $nmo->available_file || ''; ++ $available_version = $nmo->available_version; ++ if ($nmo->uptodate) { ++ my $accepts = $merged->accepts_module($need_module, $available_version); ++ unless ($accepts) { ++ my $rq = $merged->requirements_for_module( $need_module ); ++ $CPAN::Frontend->mywarn( ++ "Warning: Version '$available_version' of ". ++ "'$need_module' is up to date but does not ". ++ "fulfill requirements ($rq). I will continue, ". ++ "but chances to succeed are low.\n"); ++ } ++ next NEED; ++ } + + # if they have not specified a version, we accept any installed one + if ( $available_file +@@ -2853,8 +2865,6 @@ sub unsat_prereq { + next NEED; + } + } +- +- $available_version = $nmo->available_version; + } + + # We only want to install prereqs if either they're not installed +-- +2.7.4 + diff --git a/perl-CPAN.spec b/perl-CPAN.spec index 42ea501..0c2537b 100644 --- a/perl-CPAN.spec +++ b/perl-CPAN.spec @@ -22,6 +22,8 @@ Patch5: CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.p # Fix CVE-2016-1238 (loading optional modules from current working directory), # CPAN RT#116507, fixed after 2.14 Patch6: CPAN-2.14-CVE-2016-1238-don-t-load-optional-modules-from-defau.patch +# Recognize exact version dependency operator, CPAN RT#47934, fixed after 2.14 +Patch7: CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -204,6 +206,7 @@ external download clients to fetch distributions from the net. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Change configuration name find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; # Remove bundled modules @@ -238,6 +241,7 @@ make test (CPAN RT#110833) - Recognize URL schemata disregarding the case - Fix CVE-2016-1238 (loading optional modules from current working directory) +- Recognize exact version dependency operator (CPAN RT#47934) * Wed May 18 2016 Jitka Plesnikova <jples...@redhat.com> - 2.11-366 - Perl 5.24 re-rebuild of bootstrapped packages -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-CPAN.git/commit/?h=master&id=e19cb9de3c8965e6e493a32d6a94e0b0814fdd68 _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org