Bug 689709 - Circular and missing dependecies
Summary: Circular and missing dependecies
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Perl-MinimumVersion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ralf Corsepius
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 688782
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-22 08:56 UTC by Marcela Mašláňová
Modified: 2011-10-02 09:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 688782
Environment:
Last Closed: 2011-10-02 09:57:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marcela Mašláňová 2011-03-22 08:56:58 UTC
+++ This bug was initially created as a clone of Bug #688782 +++

(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

--- Additional comment from redhatbugs on 2011-03-18 01:47:28 CET ---

"to merge mutually modules" should read "to merge mutually dependent modules".

--- Additional comment from pm-rhel on 2011-03-18 01:52:04 CET ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from mmaslano on 2011-03-18 08:29:31 CET ---

Same problem as in bug #688778. Packages which you need are stored in optional repo.

--- Additional comment from ppisar on 2011-03-21 19:22:19 CET ---

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.

--- Additional comment from redhatbugs on 2011-03-21 21:28:15 CET ---

> 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.

Comment 1 Marcela Mašláňová 2011-03-22 11:17:58 UTC
To sum it up, some Perl packages like Perl::Test::MinimumVersion couldn't be (re)built in new environment because of circular dependency. The question is, what to do with that (or if any action is necessary).

Comment 2 Zenon Panoussis 2011-03-22 11:24:46 UTC
With regard to perl-Perl-MinimumVersion I would suggest that you just remove 'BuildRequires: perl(Test::MinimumVersion)' from the specfile.

Comment 3 Ralf Corsepius 2011-03-22 11:38:39 UTC
(In reply to comment #1)
> To sum it up, some Perl packages like Perl::Test::MinimumVersion couldn't be
> (re)built in new environment because of circular dependency. 
Correct - Fedora's perl is being built incrementally. 
Bootstrapping has never been a requirement.

> The question is,
> what to do with that (or if any action is necessary).
Nothing, because such circular dependencies can stretch accross very long dependency chains and are a moving target (Perl deps vanish and popup all of the time).

If you want to do something systematically, we could add a 
%bcond_without boottrap conditional which would be supposed to switch-off known circular dependencies by if the person who is bootstrapping from scratch explictly demands.


Also note that this warning:
t/99_pmv.t ........ skipped: Test::MinimumVersion 0.008 

a) is a just a warning
b) stems from a maintainer test (Ignorable).

Openly said, I am inclined to close this BZ as "WONTFIX".

Comment 4 Zenon Panoussis 2011-03-22 11:47:39 UTC
(In reply to comment #3)

> Also note that this warning:
> t/99_pmv.t ........ skipped: Test::MinimumVersion 0.008 
> 
> a) is a just a warning
> b) stems from a maintainer test (Ignorable).

There is a hard BuildRequires in the specfile. You get the ignorable warning if you comment out the BuildRequires. If you try to build the SRPM as-is, you get a hard failure. 

That's why I'm suggesting the removat of that BuildRequires, so as to allow the RPM to build with just the ignorable warning.

Comment 5 Ralf Corsepius 2011-03-22 12:01:32 UTC
(In reply to comment #4)
> (In reply to comment #3)
> 
> > Also note that this warning:
> > t/99_pmv.t ........ skipped: Test::MinimumVersion 0.008 
> > 
> > a) is a just a warning
> > b) stems from a maintainer test (Ignorable).
> 
> There is a hard BuildRequires in the specfile. You get the ignorable warning if
> you comment out the BuildRequires. If you try to build the SRPM as-is, you get
> a hard failure. 
> 
> That's why I'm suggesting the removat of that BuildRequires, so as to allow the
> RPM to build with just the ignorable warning.

Then let me ask differently: What are you trying to do?

Why are you rebuilding Fedora from scratch instead incrementally? Building from scratch is not supported - period.

Comment 6 Zenon Panoussis 2011-03-22 12:34:09 UTC
(In reply to comment #5)

> Why are you rebuilding Fedora from scratch instead incrementally? 

I am not; this is an EL6 bug, cloned to Fedora for the obvious reasons. In any case, I'm not sure what you mean by "incrementally". The interdependency is circular, so you'll run into it no matter which way you build. 

> Building from scratch is not supported - period.

Then please let me rephrase the bug:

1. perl-Perl-MinimumVersion contains a BuildRequires to perl-Test-MinimumVersion. 
2. perl-Test-MinimumVersion is not necessary in order to build perl-Perl-MinimumVersion. 
3. http://fedoraproject.org/wiki/Packaging/Guidelines#BuildRequires says "In package development and testing, please verify that your package is not missing any *necessary* build dependencies" (my emphasis).

Therefore the explicit "'BuildRequires: perl(Test::MinimumVersion)'" in perl-Perl-MinimumVersion.spec is wrong. 

The same can be said about more of these packages.

Comment 7 Marcela Mašláňová 2011-03-22 12:44:09 UTC
Imho if this should be fixed, then it should be fixed in Fedora first. I'm asking for opinion main owner of this package if there is need to work on it.

Comment 8 Paul Howarth 2011-03-22 12:48:32 UTC
FWIW, I like the bcond_without bootstrap idea, which should help out downstream rebuilders of EL releases in future (i.e. those that need to bootstrap).

Comment 9 Iain Arnell 2011-03-22 12:57:58 UTC
If we're voting, then +1 for bcond, but surely we'd want "bcond_with bootstrap", not bcond_without.

Comment 10 Ralf Corsepius 2011-03-23 12:43:07 UTC
(In reply to comment #7)
> Imho if this should be fixed, then it should be fixed in Fedora first.
Wasn't I clear enough?

It's impossible to fix it, because perl is full of dynamic circular dependency chains.

In this particular case you can remove a dependency which is introduced by a more or less unimportant test, but in generality, it's naive to believe this was possible.

(In reply to comment #9)
> If we're voting, then +1 for bcond, but surely we'd want "bcond_with
> bootstrap", not bcond_without.

I am insisting on bcond_without, because

our interest is Fedora, a distro which is incrementally built and want to test our packages "to the max" as part of our regular works whenever we build our packages.

i.e. people who are trying to bootstrap from scratch for whatever reasons, are not of any importance and need to be taught that Fedora is incrementally built.
Apart of perl, they will be facing similar issue all over the place, e.g. when building gcc/glibc/kernel (also an incrementally built system).

Comment 11 Iain Arnell 2011-03-23 12:52:32 UTC
(In reply to comment #10)
> I am insisting on bcond_without, because
> 
> our interest is Fedora, a distro which is incrementally built and want to test
> our packages "to the max" as part of our regular works whenever we build our
> packages.
> 
> i.e. people who are trying to bootstrap from scratch for whatever reasons, are
> not of any importance and need to be taught that Fedora is incrementally built.
> Apart of perl, they will be facing similar issue all over the place, e.g. when
> building gcc/glibc/kernel (also an incrementally built system).

I agree entirely with the argument. Rebuilders who need this should be forced to add --with bootstrap. But the bcond magic to do that is bcond_with, not bcond_without:

# Handle conditional builds. %bcond_with is for case when feature is
# default off and needs to be activated with --with ... command line
# switch. %bcond_without is for the dual case.
#
# %bcond_with foo defines symbol with_foo if --with foo was specified on
# command line.
# %bcond_without foo defines symbol with_foo if --without foo was *not*
# specified on command line.

Comment 12 Zenon Panoussis 2011-03-23 16:42:32 UTC
(In reply to comment #10)

> our interest is Fedora, a distro which is incrementally built and want to test
> our packages "to the max" as part of our regular works whenever we build our
> packages.

Even so, RHEL depends to a great extent on Fedora for its packages, so it is a consideration to weigh in. 
 
> i.e. people who are trying to bootstrap from scratch for whatever reasons, are
> not of any importance and need to be taught that Fedora is incrementally built.

Leaving the arrogant insolence of that statement aside, your task here is not to teach people, but to improve Fedora (and indirectly RHEL). Hence, you need to look at the issue from a technical point of view, not a political one. 

> Apart of perl, they will be facing similar issue all over the place, e.g. when
> building gcc/glibc/kernel (also an incrementally built system).

Apples and oranges. Obviously you can't build a compiler unless you have a compiler, but many BuildRequires in this bug are *literally unnecessary*. That is, when package A builds correctly without package B, there should not be a 'BuildRequires: B' in the specfile of A.

Comment 13 Paul Howarth 2011-06-17 08:38:28 UTC
Ralf, is there some reason why you're holding off updating Perl::MinimumVersion to 1.28?

Comment 14 Ralf Corsepius 2011-06-17 09:20:19 UTC
(In reply to comment #13)
> Ralf, is there some reason why you're holding off updating Perl::MinimumVersion
> to 1.28?

No, it's dropped off the radar, after it had quite some amount of troubles when I had tried to upgrade it back in March. 

I'll try to upgrade, ASAP (probably later today).

Comment 15 Ralf Corsepius 2011-06-17 11:20:46 UTC
Done for rawhide.


f15 is stuck in QA's delay queue.
f14 can't be built, before Fedora's QA's delay queue doesn't give freedom to  another package this perl-Perl-MinimumVersion depends upon.
.

Comment 16 Paul Howarth 2011-06-17 11:28:14 UTC
(In reply to comment #15)
> f14 can't be built, before Fedora's QA's delay queue doesn't give freedom to 
> another package this perl-Perl-MinimumVersion depends upon.

Perhaps you could try out the new Buildroot Overrides facility in Bodhi to overcome that?

Comment 17 Ralf Corsepius 2011-06-17 11:33:03 UTC
No idea what you are talking about - I feel sufficiently pissed off by Fedora QA's inventions, I am having an increasing desire to see them fired.

Comment 18 Petr Šabata 2011-06-17 11:39:07 UTC
(In reply to comment #17)
> No idea what you are talking about

http://lists.fedoraproject.org/pipermail/devel/2011-June/152347.html

Comment 19 Ralf Corsepius 2011-06-17 11:46:42 UTC
Will not do so, in protest against this infantile idiocy:

    * Make update notes mandatory (fesco#457)

Shall Fedora user be exposed to the risks Fedora QA's is resonsible for - They want it, they get it.

Comment 20 Tom "spot" Callaway 2011-10-02 09:57:21 UTC
This issue is resolved in rawhide.


Note You need to log in before you can comment on or make changes to this bug.