Bug 657153

Summary: Circular Dependency between perl-Readonly and perl-Readonly-XS
Product: [Fedora] Fedora EPEL Reporter: Andrew McNaughton <amcnaughton>
Component: perl-ReadonlyAssignee: Chris Weyl <cweyl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: el5CC: cweyl, paul, perl-devel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-29 07:51:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew McNaughton 2010-11-25 05:10:28 UTC
Description of problem:

  Circular Dependency between perl-Readonly and perl-Readonly-XS
   - each depends directly on the other

Version-Release number of selected component (if applicable):

  http://download.fedora.redhat.com/pub/epel/5/SRPMS/perl-Readonly-1.03-6.el5.src.rpm

  http://download.fedora.redhat.com/pub/epel/5/SRPMS/perl-Readonly-XS-1.04-7.el5.1.src.rpm

How reproducible:

  Is obvious from dependency statements in spec file.  try to build from those with neither module pre-installed.

Steps to Reproduce:
1. start with a clean machine with neither module installed.
2. unpack src rpms
3. try to build either rpm from spec file.
  
Actual results:

  Fail.

Expected results:

  Profit.

Additional info:

Comment 1 Paul Howarth 2010-11-25 09:18:52 UTC
Whilst it's true that the packages have runtime dependencies on each other (resulting in all users getting the performance benefits of the XS code), neither of them have build-time dependencies on each other so it should be possible to build each of them without requiring the other at build time.

What error message are you getting when trying to build them?

Comment 2 Andrew McNaughton 2010-11-25 10:05:16 UTC
(In reply to comment #1)
> Whilst it's true that the packages have runtime dependencies on each other
> (resulting in all users getting the performance benefits of the XS code),
> neither of them have build-time dependencies on each other so it should be
> possible to build each of them without requiring the other at build time.
> 
> What error message are you getting when trying to build them?

Errors like so:

[root]:/home/build/rpms/RPMS/centos/5# rpm -i /home/build/rpms/RPMS/centos/5/x86_64/perl-Readonly-XS-1.04-7.1-squiz.x86_64.rpm 
error: Failed dependencies:
	perl(Readonly) >= 1.02 is needed by perl-Readonly-XS-1.04-7.1.x86_64

[root]:/home/build/rpms/RPMS/centos/5# rpm -i /home/build/rpms/RPMS/centos/5/x86_64/perl-Readonly-1.03-6-squiz.noarch.rpm 
error: Failed dependencies:
	perl(Readonly::XS) is needed by perl-Readonly-1.03-6.noarch


hmm. actually maybe that was just after building from spec file so, can build, but can't install.

Comment 3 Paul Howarth 2010-11-25 10:33:56 UTC
You need to install them in the same rpm transaction, which is what would happen if you were using yum.

# rpm -i \
  perl-Readonly-XS-1.04-7.1-squiz.x86_64.rpm \
  perl-Readonly-1.03-6-squiz.noarch.rpm

Why aren't you installing these from EPEL using yum by the way?

Comment 4 Andrew McNaughton 2010-11-26 19:53:10 UTC
I'm adding another module to a company's in-house repository which depends on perl-Readonly.  It's basically duplication of work in epel, but only quite a limited set of the epel material is added, plus a few things from elsewhere.

Comment 5 Paul Howarth 2010-11-26 20:40:58 UTC
OK. I trust you got the modules installed OK via the repository when they get installed together (or manually)?

Comment 6 Andrew McNaughton 2010-11-27 00:26:03 UTC
I sorted it our for my own purposes by removing one of the dependencies in the spec file.  using rpm to install both at once is better though, and I'll go back and do that.

Comment 7 Marcela Mašláňová 2010-11-29 07:51:39 UTC
RPM doesn't offer optional dependencies, therefore Perl modules with cyclic dependencies exist quite often. The dependency on Readonly::XS was added to support all features, which can Readonly offer. It's not the best solution, but that's how we handle modules in RPM.

The correct installation of dependent modules is, as was said before, rpm -i perl-Readonly perl-Readonly-XS.