Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 688782

Summary: Circular and missing dependecies
Product: Red Hat Enterprise Linux 6 Reporter: Zenon Panoussis <redhatbugs>
Component: perlAssignee: perl-maint-list
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: ppisar, psabata
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 689709 (view as bug list) Environment:
Last Closed: 2011-03-18 07:29:31 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:
Bug Depends On:    
Bug Blocks: 689709    

Description Zenon Panoussis 2011-03-18 00:45:18 UTC
(Wrongly) filed against perl because of bug #688778. 

Several perl modules cannot be built from SRPM because of circular dependecies. perl-Perl-Critic (needed by perl-Test-Perl-Critic) and perl-Test-Base (needed by perl-WWW-Curl) seem to be missing altogether. The most apparent blocker is perl-Perl-MinimumVersion, needed by most everything else, depending on perl-Test-MinimumVersion, which in turn depends back on perl-Perl-MinimumVersion. 

The only way to solve this in an RPM-compatible way is to merge mutually modules into buildable packages. For example, merge perl-Perl-MinimumVersion and perl-Test-MinimumVersion into one SRPM that produces the two RPMs while satisfying internal interdependencies during build time. 

Here's the full list:

Attempting to build rpmbuild/SPECS/perl-AppConfig.spec:
error: Failed build dependencies:
	perl(File::HomeDir) >= 0.61 is needed by perl-AppConfig-1.66-6.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Archive-Zip.spec:
error: Failed build dependencies:
	perl(File::Which) >= 0.05 is needed by perl-Archive-Zip-1.30-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Class-Inspector.spec:
error: Failed build dependencies:
	perl(Perl::MinimumVersion) >= 1.20 is needed by perl-Class-Inspector-1.24-4.el6.noarch
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-Class-Inspector-1.24-4.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Config-Tiny.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) is needed by perl-Config-Tiny-2.12-7.1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Crypt-SSLeay.spec:
error: Failed build dependencies:
	perl(ExtUtils::MakeMaker::Coverage) is needed by perl-Crypt-SSLeay-0.57-16.el6.x86_64

Attempting to build rpmbuild/SPECS/perl-Devel-Cover.spec:
error: Failed build dependencies:
	perl(Template) is needed by perl-Devel-Cover-0.65-1.el6.x86_64
	perl(PPI::HTML) >= 1.07 is needed by perl-Devel-Cover-0.65-1.el6.x86_64

Attempting to build rpmbuild/SPECS/perl-File-Find-Rule-Perl.spec:
error: Failed build dependencies:
	perl(Perl::MinimumVersion) >= 1.20 is needed by perl-File-Find-Rule-Perl-1.09-2.el6.noarch
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-File-Find-Rule-Perl-1.09-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-File-HomeDir.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) is needed by perl-File-HomeDir-0.86-3.el6.noarch

Attempting to build rpmbuild/SPECS/perl-File-Remove.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-File-Remove-1.42-4.el6.noarch

Attempting to build rpmbuild/SPECS/perl-File-Which.spec:
error: Failed build dependencies:
	perl(Test::Script) is needed by perl-File-Which-1.09-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Module-Install.spec:
error: Failed build dependencies:
	perl(File::Remove) >= 1.42 is needed by perl-Module-Install-0.91-4.el6.noarch
	perl(Module::ScanDeps) is needed by perl-Module-Install-0.91-4.el6.noarch
	perl(PAR::Dist) >= 0.29 is needed by perl-Module-Install-0.91-4.el6.noarch
	perl(Test::MinimumVersion) is needed by perl-Module-Install-0.91-4.el6.noarch
	perl(YAML::Tiny) >= 1.38 is needed by perl-Module-Install-0.91-4.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Module-ScanDeps.spec:
error: Failed build dependencies:
	perl(prefork) is needed by perl-Module-ScanDeps-0.95-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Params-Util.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) >= 0.007 is needed by perl-Params-Util-1.00-3.el6.x86_64

Attempting to build rpmbuild/SPECS/perl-PAR-Dist.spec:
error: Failed build dependencies:
	perl(YAML::Tiny) is needed by perl-PAR-Dist-0.46-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Perl-Critic.spec:
error: Failed build dependencies:
	perl(Config::Tiny) >= 2 is needed by perl-Perl-Critic-1.105-2.el6.noarch
	perl(File::HomeDir) is needed by perl-Perl-Critic-1.105-2.el6.noarch
	perl(PPI) >= 1.205 is needed by perl-Perl-Critic-1.105-2.el6.noarch
	perl(Test::Perl::Critic) is needed by perl-Perl-Critic-1.105-2.el6.noarch
	perl(File::Which) is needed by perl-Perl-Critic-1.105-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Perl-MinimumVersion.spec:
error: Failed build dependencies:
	perl(PPI) >= 1.118 is needed by perl-Perl-MinimumVersion-1.20-3.el6.noarch
	perl(Test::Script) >= 1.02 is needed by perl-Perl-MinimumVersion-1.20-3.el6.noarch
	perl(File::Find::Rule::Perl) >= 1.04 is needed by perl-Perl-MinimumVersion-1.20-3.el6.noarch
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-Perl-MinimumVersion-1.20-3.el6.noarch

Attempting to build rpmbuild/SPECS/perl-PPI-HTML.spec:
error: Failed build dependencies:
	perl(PPI) is needed by perl-PPI-HTML-1.07-7.el6.noarch

Attempting to build rpmbuild/SPECS/perl-PPI.spec:
error: Failed build dependencies:
	perl(File::Remove) >= 1.42 is needed by perl-PPI-1.206-4.el6.noarch
	perl(Test::ClassAPI) >= 1.04 is needed by perl-PPI-1.206-4.el6.noarch
	perl(Test::SubCalls) >= 1.07 is needed by perl-PPI-1.206-4.el6.noarch

Attempting to build rpmbuild/SPECS/perl-prefork.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) >= 0.007 is needed by perl-prefork-1.04-2.el6.noarch
	perl(Perl::MinimumVersion) >= 1.20 is needed by perl-prefork-1.04-2.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Template-Toolkit.spec:
error: Failed build dependencies:
	perl(AppConfig) is needed by perl-Template-Toolkit-2.22-5.el6.x86_64

Attempting to build rpmbuild/SPECS/perl-Test-ClassAPI.spec:
error: Failed build dependencies:
	perl(Config::Tiny) >= 2.00 is needed by perl-Test-ClassAPI-1.06-2.1.el6.noarch
	perl(Class::Inspector) >= 1.12 is needed by perl-Test-ClassAPI-1.06-2.1.el6.noarch
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-Test-ClassAPI-1.06-2.1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Test-MinimumVersion.spec:
error: Failed build dependencies:
	perl(File::Find::Rule::Perl) is needed by perl-Test-MinimumVersion-0.011-2.1.el6.noarch
	perl(Perl::MinimumVersion) >= 1.20 is needed by perl-Test-MinimumVersion-0.011-2.1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Test-Perl-Critic.spec:
error: Failed build dependencies:
	perl(Perl::Critic) >= 0.21 is needed by perl-Test-Perl-Critic-1.01-7.1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Test-Script.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-Test-Script-1.06-1.el6.noarch
	perl(Perl::MinimumVersion) >= 1.20 is needed by perl-Test-Script-1.06-1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-Test-SubCalls.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) >= 0.008 is needed by perl-Test-SubCalls-1.09-1.el6.noarch

Attempting to build rpmbuild/SPECS/perl-WWW-Curl.spec:
error: Failed build dependencies:
	perl(Test::Base) is needed by perl-WWW-Curl-4.09-3.el6.x86_64

Attempting to build rpmbuild/SPECS/perl-YAML-Tiny.spec:
error: Failed build dependencies:
	perl(Test::MinimumVersion) is needed by perl-YAML-Tiny-1.40-2.el6.noarch

Comment 1 Zenon Panoussis 2011-03-18 00:47:28 UTC
"to merge mutually modules" should read "to merge mutually dependent modules".

Comment 3 Marcela Mašláňová 2011-03-18 07:29:31 UTC
Same problem as in bug #688778. Packages which you need are stored in optional repo.

Comment 4 Petr Pisar 2011-03-21 18:22:19 UTC
Marcela, this is somewhat different problem. As explained at the beginning, this is about circular build time dependencies.

        E.g.
         ↓
perl-Perl-MinimumVersion  ←  that is provided by  ←  perl(Perl::MinimumVersion)
         ↓                                                    ↑
      requires                                           that requires
         ↓                                                    ↑
perl(Test::MinimumVersion)  → that is provided by →  perl-Test-MinimumVersion

See, you cannot build any of the packages without having pre-build the other one already. In other words, you cannot build them from scratch.

The light side of this problem is, they needs each other for tests only. Thus simple removal of the circular tests can work-around this problem.

Better approach would be to add a optional-BuildRequires feature into rpmbuild tool. This would allow to build the package without the soft dependency and also with the dependency.

However I can understand this is not the desired way how to build packages in binary distribution. Also one must accept there are unavoidable dependency cycles in the tool chain itself (bintutils, gcc, glibc). This has always been solved by boot-strapping from different system.

The only question is where we put the line between acceptable boot-strap unacceptable cycle.

Comment 5 Zenon Panoussis 2011-03-21 20:28:15 UTC
> The only question is where we put the line between acceptable boot-strap
> unacceptable cycle.

Yes, and the amount of work that it would take to fix these dependencies, offset against the difficulties caused by not fixing them. 

In the case of these modules, bootstrapping is easy. Therefore, fixing the dependencies is not really necessary, but would be "nice". 

In the specific case of perl-Perl-MinimumVersion, this is what happens if 'BuildRequires: perl(Test::MinimumVersion)' is commented out in the specfile:

+ make test AUTOMATED_TESTING=1
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/01_compile.t .... ok   
t/02_main.t ....... ok     
t/03_open_3arg.t .. skipped: not yet implemented
t/97_meta.t ....... ok   
t/98_pod.t ........ ok   
t/99_pmv.t ........ skipped: Test::MinimumVersion 0.008 not available for testing
All tests successful.

Theoretically, not using Test::MinimumVersion could potentially result in a bad Perl::MinimumVersion getting built. Then again, that can only happen if we build the SRPM on a "foreign" system, e.g. an EL6 SRPM on Fedora or vice versa. As long as we build it on the distro that it belongs to, it would always build fine because we already know what versions are part of that distro. 

Hence, in this particular case, bootstrapping might only be needed in order to detect inconsistencies while piecing together a new distro, but it's not really needed in a ready distro.