[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: New perl spec file



On Sat, 2007-03-31 at 06:52 +0200, Ralf Corsepius wrote:
> On Wed, 2007-03-28 at 15:33 -0400, Robin Norwood wrote:
> > Hi,
> > 
> > Sorry for the delay, but here's a new perl spec file including Ralf and
> > Tom's changes, removing the Requires: perl-devel, and a couple of minor
> > cleanups from me.
> > 
> > It seems to build, except on s390... I'll look into that.
> > 
> > Comments?
> It doesn't work.
> 
> The epochs on dependencies on "perl" inside of sub-packages are wrong.
> 
> E.g.:
> # rpm -q --requires -p perl-CPAN-1.76_02-16.i386.rpm 
> ...
> perl = 0:5.8.8-16
> ...
> 
> # rpm -q --provides -p perl-5.8.8-16.i386.rpm
> ...
> perl = 4:5.8.8-16
> ...
> 
> This causes all kind of dependency breakages in yum.
> 
> AFAIS, you seem to have missed the %{epoch} related Requires having been
> contained in my latest *.spec.
Scratch this sentence - I was wrong.

You added
Requires:       perl = %{epoch}:%{perl_version}-%{release}
to subpackages' %package.


This breaks if a subpackage uses a different Epoch as the main packages,
for example this:
...
%package Test-Harness
Summary:        Run Perl standard test scripts with statistics
Group:          Development/Languages
Epoch:          0
Version:        2.56
Requires:       perl-devel
Requires:       perl = %{epoch}:%{perl_version}-%{release}
...

At the time, rpm processes the %{epoch} inside of the 
"Requires: perl =...", 
%{epoch} contains the "0" from the "Epoch: 0" line above and doesn't
contain the global epoch anymore.


A brute-force approach to work-around this would be to add a global 
%define perl_epoch 4
at the beginning of the *.spec and to replace all references to the main
perl package's Epoch (%{epoch}) with %{perl_epoch}

The patch below implements this approach.

Ralf

Index: perl.spec
===================================================================
RCS file: /cvs/dist/devel/perl/perl.spec,v
retrieving revision 1.110
diff -u -r1.110 perl.spec
--- perl.spec	28 Mar 2007 18:53:53 -0000	1.110
+++ perl.spec	31 Mar 2007 05:20:11 -0000
@@ -9,6 +9,7 @@
 %define new_perl %{new_perl_flags} $RPM_BUILD_ROOT/%{_bindir}/perl
 
 %define perl_version    5.8.8
+%define perl_epoch	4
 
 # Use this for SUPER PERL DEBUGGING MODE.
 %{?!perl_debugging:    %define perl_debugging 0}
@@ -19,8 +20,8 @@
 
 Name:           perl
 Version:        5.8.8
-Release:        16%{?dist}
-Epoch:          4
+Release:        16.1%{?dist}
+Epoch:          %{perl_epoch}
 Summary:        The Perl programming language
 Group:          Development/Languages
 License:        Artistic or GPL
@@ -197,7 +198,7 @@
 %package devel
 Summary:        Header files for use in perl development
 Group:          Development/Languages
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description devel
 This package contains header files and development modules.
@@ -207,7 +208,7 @@
 %package suidperl
 Summary:        Suidperl, for use with setuid perl scripts
 Group:          Development/Languages
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description suidperl
 Suidperl is a setuid binary copy of perl that allows for (hopefully)
@@ -218,7 +219,7 @@
 Group:          Development/Languages
 Epoch:          0
 Version:        1.76_02
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description CPAN
 Query, download and build perl modules from CPAN sites.
@@ -229,7 +230,7 @@
 Epoch:          0
 Version:        1.26
 Requires:       perl-devel
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description ExtUtils-Embed
 Utilities for embedding Perl in C/C++ applications.
@@ -240,7 +241,7 @@
 Epoch:          0
 Version:        6.30
 Requires:       perl-devel
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description ExtUtils-MakeMaker
 Create a module Makefile.
@@ -251,7 +252,7 @@
 Epoch:          0
 Version:        2.56
 Requires:       perl-devel
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description Test-Harness
 Run Perl standard test scripts with statistics.
@@ -262,7 +263,7 @@
 Epoch:          0
 Version:        0.62
 Requires:       perl-devel
-Requires:       perl = %{epoch}:%{perl_version}-%{release}
+Requires:       perl = %{perl_epoch}:%{perl_version}-%{release}
 
 %description Test-Simple
 Basic utilities for writing tests.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]