Bug 1558427

Summary: Useless dependency on perl(Path::Iter) prevents from bootstrapping Perl packages
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perl-File-Copy-RecursiveAssignee: Ralf Corsepius <rc040203>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: lxtnow, perl-devel, rc040203, tcallawa, tremble
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-File-Copy-Recursive-0.40-3.fc28 perl-File-Copy-Recursive-0.40-3.fc26 perl-File-Copy-Recursive-0.40-3.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-04 15:50:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The build cycle none

Description Petr Pisar 2018-03-20 08:37:02 UTC
Created attachment 1410289 [details]
The build cycle

File-Copy-Recursive-0.40 removed dependency on Path::Iter, but it's still written in spec file. This unneeded dependency prevents from building Perl packages from scratch because it creates a build-cycle. See the attached image.

Please remove `perl(Path::Iter)' build-requirement from perl-File-Copy-Recursive.spec.

When I was investigating this issue, I found out that some used Perl modules are not listed in the spec file. Please consider applying this patch:

diff --git a/perl-File-Copy-Recursive.spec b/perl-File-Copy-Recursive.spec
index 62bdec2..447e6a3 100644
--- a/perl-File-Copy-Recursive.spec
+++ b/perl-File-Copy-Recursive.spec
@@ -6,6 +6,7 @@ License: 	GPL+ or Artistic
 URL: 		http://search.cpan.org/dist/File-Copy-Recursive/
 Source0: 	http://www.cpan.org/modules/by-module/File/File-Copy-Recursive-%{version}.tar.gz
 Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:  perl(File::Glob)
 BuildArch: noarch
 
 BuildRequires:  %{__perl}
@@ -13,11 +14,17 @@ BuildRequires:  %{__make}
 
 BuildRequires:  perl-generators
 BuildRequires:  perl(Carp)
+BuildRequires:  perl(Cwd)
 BuildRequires:  perl(Exporter)
 BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(File::Copy)
+BuildRequires:  perl(File::Glob)
 BuildRequires:	perl(File::Spec)
-BuildRequires:  perl(Path::Iter)
+BuildRequires:  perl(File::Temp)
 BuildRequires:  perl(Path::Tiny)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(vars)
+BuildRequires:  perl(warnings)
 BuildRequires:  perl(Test::Deep)
 BuildRequires:  perl(Test::Exception)
 BuildRequires:  perl(Test::File)

Comment 1 Petr Pisar 2018-03-20 08:44:04 UTC
I can seen 0.40 is in Fedora since version 27.

Comment 2 Ralf Corsepius 2018-03-23 06:27:34 UTC
Thanks for the patch.

Any insights, why rpm's dep-generator doesn't catch perl(File::Glob)?

Comment 3 Petr Pisar 2018-03-23 09:12:15 UTC
The generator intentionally ignores non-top-level run-time-loaded modules,
indented "require Foo":

my $glob = sub {
    my ( $do, $src_glob, @args ) = @_;

    local $CPRFComp = 1;
    require File::Glob;

    my @rt;
    for my $path ( File::Glob::bsd_glob($src_glob) ) {
        my @call = [ $do->( $path, @args ) ] or return;
        push @rt, \@call;
    }

    return @rt;
};

I believe the reason is many false positives like branches that never execute on Fedora, e.g:

if ($^O eq 'MSWin32') {
  require Win32::Foo;
}

Comment 4 Fedora Update System 2018-03-23 17:38:29 UTC
perl-File-Copy-Recursive-0.40-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0d1617f491

Comment 5 Fedora Update System 2018-03-23 17:38:41 UTC
perl-File-Copy-Recursive-0.40-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c4fb1d3e12

Comment 6 Fedora Update System 2018-03-23 17:38:49 UTC
perl-File-Copy-Recursive-0.40-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-051664aa73

Comment 7 Fedora Update System 2018-03-24 02:28:06 UTC
perl-File-Copy-Recursive-0.40-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-051664aa73

Comment 8 Fedora Update System 2018-03-24 03:35:06 UTC
perl-File-Copy-Recursive-0.40-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0d1617f491

Comment 9 Fedora Update System 2018-03-24 20:05:54 UTC
perl-File-Copy-Recursive-0.40-3.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c4fb1d3e12

Comment 10 Fedora Update System 2018-04-04 15:50:34 UTC
perl-File-Copy-Recursive-0.40-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-04-04 16:47:15 UTC
perl-File-Copy-Recursive-0.40-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2018-04-04 17:09:19 UTC
perl-File-Copy-Recursive-0.40-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.