Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.

Summary: Circular build dependency in perl-DateTime-0.70-3.fc18

https://bugzilla.redhat.com/show_bug.cgi?id=810510

           Summary: Circular build dependency in perl-DateTime-0.70-3.fc18
           Product: Fedora
           Version: rawhide
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: unspecified
          Priority: unspecified
         Component: perl-DateTime
        AssignedTo: st...@silug.org
        ReportedBy: p...@city-fan.org
         QAContact: extras...@fedoraproject.org
                CC: st...@silug.org, iarn...@gmail.com,
                    fedora-perl-devel-l...@redhat.com
    Classification: Fedora
      Story Points: ---
              Type: Bug
        Regression: ---
        Mount Type: ---
     Documentation: ---


DateTime has a hard dependency on DateTime::TimeZone and won't run without it.
DateTime::TimeZone can be built without DateTime present but the resulting rpm
package has a dependency on perl(DateTime) and hence cannot be used to
bootstrap the perl-DateTime package.

My suggested fix is not to include perl(DateTime::TimeZone) as a build
requirement when bootstrapping, and that in turn means the test suite cannot be
run when bootstrapping. Since perl-DateTime needs special treatment for
bootstrapping, you might as well also add perl(DateTime::Format::Strptime) as a
buildreq when not bootstrapping:

diff --git a/perl-DateTime.spec b/perl-DateTime.spec
index 24cf770..60f5a38 100644
--- a/perl-DateTime.spec
+++ b/perl-DateTime.spec
@@ -7,12 +7,14 @@ License:        Artistic 2.0
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/DateTime/
 Source0:       
http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.tar.gz
-# circular dependency - only used for one test
-#BuildRequires:  perl(DateTime::Format::Strptime) >= 1.2000
 BuildRequires:  perl(base)
 BuildRequires:  perl(constant)
 BuildRequires:  perl(DateTime::Locale) >= 0.41
+# Build requirements that themselves require DateTime
+%if 0%{!?perl_bootstrap:1}
+BuildRequires:  perl(DateTime::Format::Strptime) >= 1.2000
 BuildRequires:  perl(DateTime::TimeZone) >= 1.09
+%endif
 BuildRequires:  perl(Math::Round)
 BuildRequires:  perl(Module::Build)
 BuildRequires:  perl(Params::Validate) >= 0.76
@@ -55,7 +57,10 @@ find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null
\;
 %{_fixperms} %{buildroot}/*

 %check
+# DateTime::TimeZone is a hard requirement of DateTime, but DateTime::TimeZone
itself requires DateTime
+%if ! 0%{?perl_bootstrap:1}
 RELEASE_TESTING=1 ./Build test
+%endif

 %files
 %doc Changes CREDITS LICENSE README TODO



Other notes:

You could safely add the release test requirements, even when bootstrapping:

BuildRequires:  perl(Test::CPAN::Changes)
BuildRequires:  perl(Test::EOL)
BuildRequires:  perl(Test::NoTabs)
BuildRequires:  perl(Test::Pod) >= 1.14
BuildRequires:  perl(Test::Pod::Coverage) >= 1.08
BuildRequires:  perl(Test::Spelling), aspell-en


Latest upstream release is 0.74.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to