!10 Simplify the upgrade-to-next-stable logic
From: @hongjinghao Reviewed-by: @licunlong Signed-off-by: @licunlong
This commit is contained in:
commit
e35218908a
31
backport-Simplify-the-upgrade-to-next-stable-logic.patch
Normal file
31
backport-Simplify-the-upgrade-to-next-stable-logic.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 33e0c0e1de3fdecb4a627eaa1662871e13e041d2 Mon Sep 17 00:00:00 2001
|
||||
From: Leon Timmermans <fawaka@gmail.com>
|
||||
Date: Fri, 4 Feb 2022 13:29:58 +0100
|
||||
Subject: [PATCH] Simplify the upgrade-to-next-stable logic
|
||||
|
||||
---
|
||||
lib/experimental.pm | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/experimental.pm b/lib/experimental.pm
|
||||
index 41b3994..9fa4461 100644
|
||||
--- a/lib/experimental.pm
|
||||
+++ b/lib/experimental.pm
|
||||
@@ -72,12 +72,8 @@ sub _enable {
|
||||
croak "Can't enable unknown feature $pragma";
|
||||
}
|
||||
elsif ($] < $min_version{$pragma}) {
|
||||
- my $stable = $min_version{$pragma};
|
||||
- if ($stable->{version}[1] % 2) {
|
||||
- $stable = version->new(
|
||||
- "5.".($stable->{version}[1]+1).'.0'
|
||||
- );
|
||||
- }
|
||||
+ my $stable = $min_version{$pragma}->stringify;
|
||||
+ $stable =~ s/^ 5\. ([0-9]?[13579]) \. \d+ $/"5." . ($1 + 1) . ".0"/xe;
|
||||
croak "Need perl $stable or later for feature $pragma";
|
||||
}
|
||||
elsif ($] >= ($removed_in_version{$pragma} || 7)) {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
Name: perl-experimental
|
||||
Version: 0.025
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Experimental features made easy
|
||||
License: GPL+ or Artistic
|
||||
URL: http://search.cpan.org/dist/experimental/
|
||||
Source0: http://www.cpan.org/authors/id/L/LE/LEONT/experimental-%{version}.tar.gz
|
||||
|
||||
Patch0001: backport-Simplify-the-upgrade-to-next-stable-logic.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: make perl-generators perl-interpreter
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
@ -50,6 +53,9 @@ make test
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Oct 24 2022 hongjinghao <hongjinghao@huawei.com> - 0.025-2
|
||||
- Simplify code's logic
|
||||
|
||||
* Wed Nov 24 2021 yuanxin <yuanxin24@huawei.com> - 0.025-1
|
||||
- update version to 0.025
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user