Properly handle "requires: perl: 0" in META.yml.

This commit is contained in:
stevenpritchard
2007-07-10 15:29:34 +00:00
parent 03222c517c
commit 45b5a62595
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -2,6 +2,7 @@
* Get rid of the word "Extras".
* Filter out "Loading ... plugin" when running repoquery.
* Properly handle "requires: perl: 0" in META.yml.
1.71 2007-06-29
+3 -3
View File
@@ -10,7 +10,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: cpanspec,v 1.50 2007/07/09 19:03:51 stevenpritchard Exp $
# $Id: cpanspec,v 1.51 2007/07/10 15:29:34 stevenpritchard Exp $
our $NAME="cpanspec";
our $VERSION='1.72';
@@ -939,12 +939,12 @@ END
printf $spec "%-16s%s\n", "BuildArch:", "noarch" if ($noarch);
if ($requires{perl}) {
if (defined($requires{perl})) {
$build_requires{perl}=$build_requires{perl} || $requires{perl};
delete $requires{perl};
}
if ($build_requires{perl}) {
if (defined($build_requires{perl})) {
printf $spec "%-16s%s >= %s\n", "BuildRequires:", "perl",
(($build_requires{perl} lt "5.6.0" ? "0:" : "1:")
. $build_requires{perl});