From 96979368e9c97a2d70909191710464273dd074c7 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 23 Dec 2009 11:51:42 +0100 Subject: [PATCH] - treat BuildPreReq as BuildRequires --- Build/Rpm.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Build/Rpm.pm b/Build/Rpm.pm index 1f3bc56..5d63d99 100644 --- a/Build/Rpm.pm +++ b/Build/Rpm.pm @@ -269,7 +269,7 @@ sub parse { if ($skip) { $xspec->[-1] = [ $xspec->[-1], undef ] if $xspec; - $ifdeps = 1 if $line =~ /^(BuildRequires|BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i; + $ifdeps = 1 if $line =~ /^(BuildRequires|BuildPrereq|BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i; next; } @@ -333,7 +333,7 @@ sub parse { } next; } - if ($preamble && ($line =~ /^(BuildRequires|BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i)) { + if ($preamble && ($line =~ /^(BuildRequires|BuildPrereq|BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i)) { my $what = $1; my $deps = $2; $ifdeps = 1 if $hasif; @@ -370,7 +370,7 @@ sub parse { } $replace = 1 if grep {/^-/} @ndeps; - if (lc($what) ne 'buildrequires') { + if (lc($what) ne 'buildrequires' && lc($what) ne 'buildprereq') { push @packdeps, map {"-$_"} @ndeps; next; } -- 2.7.4