[MacPorts] #58610: CPAN.pm/cpan2port needs gzip?
MacPorts
noreply at macports.org
Sat Jun 15 22:21:53 UTC 2019
#58610: CPAN.pm/cpan2port needs gzip?
--------------------------+-----------------------------
Reporter: chrstphrchvz | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: perl5 cpan2port
--------------------------+-----------------------------
I have Perl 5.28.2 installed, which includes CPAN.pm 2.20; updating
CPAN.pm to 2.26 does not resolve this issue.
The `gzip` port is not declared as a dependency of `perl5.28`, but CPAN
shell (`cpan-5.28`) erroneously finishes when /opt/local/bin/gzip isn't
present. Distributions are never extracted (e.g. to `.cpan/build`), but
CPAN shell proceeds as if modules build and are ready to install. Had CPAN
shell worked in this example (as when `gzip` is present), then it would
have found a Makefile.PL and compiled a few XS files:
{{{
$ cpan Tk::IDElayout
Reading '/Users/christopherchavez/.cpan/Metadata'
Database was generated on Sat, 15 Jun 2019 17:17:02 GMT
Running install for module 'Tk::IDElayout'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.086)
Checksum for /Users/christopherchavez/.cpan/sources/authors/id/C/CA/CAC
/Tk-IDElayout-0.34.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
CPAN: YAML loaded ok (v1.29)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: CPAN::Meta loaded ok (v2.150010)
Package seems to come without Makefile.PL.
(The test -f "/Users/christopherchavez/.cpan/build/CAC-1/Makefile.PL"
returned false.)
Writing one on our own (setting NAME to TkIDElayout)
Configuring C/CA/CAC/Tk-IDElayout-0.34.tar.gz with Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for TkIDElayout
Writing MYMETA.yml and MYMETA.json
CAC/Tk-IDElayout-0.34.tar.gz
/opt/local/bin/perl5.28 Makefile.PL -- OK
Running make for C/CA/CAC/Tk-IDElayout-0.34.tar.gz
CPAN: Module::CoreList loaded ok (v5.20190419)
CAC/Tk-IDElayout-0.34.tar.gz
/usr/bin/make -- OK
Running make test
No tests defined for TkIDElayout extension.
CAC/Tk-IDElayout-0.34.tar.gz
/usr/bin/make test -- OK
Running make install
Password:
}}}
As a result, running `cpan2port` (20190228) without `gzip` present fails,
because the distribution was never extracted:
{{{
$ cpan2port -v -t Tk::IDElayout
Reading '/Users/christopherchavez/.cpan/Metadata'
Database was generated on Sat, 15 Jun 2019 17:17:02 GMT
Tk::IDElayout is not perl porter
Tk::IDElayout (no description available)
Tk::IDElayout will show deps
Running get for module 'Tk::IDElayout'
Checksum for /Users/christopherchavez/.cpan/sources/authors/id/C/CA/CAC
/Tk-IDElayout-0.34.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
trying to find dist in /Users/christopherchavez/.cpan/build/Tk-
IDElayout-0.34*
trying to find dist in 1*
(((can't find dist at /opt/local/bin/cpan2port line 127.
))) at /opt/local/bin/cpan2port line 353.
main::foreach_pkg(CODE(0x7fc08f004248)) called at
/opt/local/bin/cpan2port line 378
}}}
I found a ticket that another MacPorts user opened for CPAN which seems
related: https://rt.cpan.org/Public/Bug/Display.html?id=128063. I'm not
sure their resolution of making `cpan-5.xx` use /usr/bin/gzip (if
/opt/local/bin/gzip is missing) is appropriate, since the intention might
be for ports to only use MacPorts' gzip.
--
Ticket URL: <https://trac.macports.org/ticket/58610>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list