Bug 1307852

Summary: perl-MooX-Cmd: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: perl-MooX-OptionsAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: ddick, perl-devel, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-MooX-Options-4.022-3.fc25 perl-MooX-Options-4.022-3.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 11:46:28 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: 1305208    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2016-02-13 22:00:35 UTC
Your package perl-MooX-Cmd failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=12851610

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

Comment 1 Fedora Release Engineering 2016-02-13 22:00:37 UTC
Created attachment 1125617 [details]
build.log

Comment 2 Fedora Release Engineering 2016-02-13 22:00:39 UTC
Created attachment 1125618 [details]
root.log

Comment 3 Fedora Release Engineering 2016-02-13 22:00:40 UTC
Created attachment 1125619 [details]
state.log

Comment 4 Jan Kurik 2016-02-24 14:58:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 5 Petr Pisar 2016-05-05 13:33:11 UTC
Tests fail:

t/01-simple.t ............... ok
#   Failed test 'test 'OptionTestApp => [ --help ]' help message'
#   at t/02-moox-options.t line 33.
#                   ''
#     doesn't match '(?^:USAGE\:\ 02\-moox\-options\.t\ \[\-h\])'
#   Failed test 'test 'OptionTestApp => [ --help ]' avail commands ok'
#   at t/02-moox-options.t line 35.
#                   ''
#     doesn't match '(?^:SUB\ COMMANDS\ AVAILABLE\:\ (?:oops|primary))'
#   Failed test 'test 'OptionTestApp => [ primary --help ]' help message'
#   at t/02-moox-options.t line 33.
#                   ''
#     doesn't match '(?^:USAGE\:\ 02\-moox\-options\.t\ primary\ \[\-h\])'
#   Failed test 'test 'OptionTestApp => [ primary --help ]' avail commands ok'
#   at t/02-moox-options.t line 35.
#                   ''
#     doesn't match '(?^:SUB\ COMMANDS\ AVAILABLE\:\ secondary)'
#   Failed test 'test 'OptionTestApp => [ --in-doubt primary secondary --help ]' help message'
#   at t/02-moox-options.t line 33.
#                   ''
#     doesn't match '(?^:USAGE\:\ 02\-moox\-options\.t\ primary\ secondary\ \[\-h\])'
# Looks like you failed 5 tests of 26.
t/02-moox-options.t ......... 
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/26 subtests

Comment 6 Petr Pisar 2016-05-05 14:36:37 UTC
Reproducer is:

$ perl -Ilib -It/lib -MMoo -MMooX::Cmd::Tester -MMooX::Options -MOptionTestApp -e 'warn test_cmd(q{OptionTestApp}=>[q{--help}])->stdout;'

from the unpacked sources. It should print the usage text (that happens in F23), but it does not print anything (F25).

Comment 7 Petr Pisar 2016-05-05 15:14:45 UTC
Scratch builds fail in koji. It also fails in local mock builds. But it passes in in weekly perl scratch builds (F25 in mock). It also passed in my F24 virtual machine until I removed all perl packaged and installed only declared dependencies.

I suspect there is some hidden undeclared dependency that causes it.

Comment 8 Petr Pisar 2016-05-05 15:31:57 UTC
Yes. It's caused by perl-Unicode-LineBreak-2015.12-2.fc24. It fails without the package, it passes with the package.

Comment 9 Petr Pisar 2016-05-05 15:52:41 UTC
It looks like a bug in perl-MooX-Options. /usr/share/perl5/vendor_perl/MooX/Options/Descriptive/Usage.pm has this code:

# set the column size of your terminal into the wrapper
sub _get_line_fold {
    my $columns = $ENV{TEST_FORCE_COLUMN_SIZE}
        || eval {
        require Term::Size::Any;
        [ Term::Size::Any::chars() ]->[0];
        } || 80;

    require Text::LineFold;
    return Text::LineFold->new( ColMax => $columns - 4 );
}

but perl-MooX-Options does not declare dependency on Text::LineFold.

The perl-MooX-CMD's test t/lib/OptionTestApp/Cmd/primary/Cmd/secondary.pm has some code in the eval and it's tha last common code path between failing and passing case. Just after that interpreter would open /usr/lib64/perl5/vendor_perl/Text/LineFold.pm. Because of the secondary.pm' eval the "require Text::LineFold" failure is masked so we don't get report from MooX::Options::Descriptive::Usage.

Comment 10 Fedora Update System 2016-05-06 07:15:36 UTC
perl-MooX-Options-4.022-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b283405ccb

Comment 11 Fedora Update System 2016-05-06 11:26:15 UTC
perl-MooX-Options-4.022-3.fc24 has been pushed to the Fedora 24 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-2016-b283405ccb

Comment 12 Fedora Update System 2016-05-10 11:46:26 UTC
perl-MooX-Options-4.022-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.