Opened 8 years ago

Last modified 8 years ago

#51427 new defect

cpan2port: does not generate working Portfile even for own HOWTO example.

Reported by: thevlad@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: contrib Version: 2.3.4
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

Trying to build Net::Curl perl port and started with cpan2port HOWTO example (wiki:howto/cpan2port). Even example fails. Why does it try to install p5.22-timedate for timedate example port?

glagol:macports vsaf$ ./cpan2port -t Date::Parse
Date::Parse is not perl porter
Date::Parse (no description available)
Date::Parse will show deps
Is it OK to try to connect to the Internet? [yes] 
x TimeDate-2.30/
x TimeDate-2.30/ChangeLog
x TimeDate-2.30/lib/
x TimeDate-2.30/Makefile.PL
x TimeDate-2.30/MANIFEST
x TimeDate-2.30/META.json
x TimeDate-2.30/META.yml
x TimeDate-2.30/README
x TimeDate-2.30/SIGNATURE
x TimeDate-2.30/t/
x TimeDate-2.30/t/cpanrt.t
x TimeDate-2.30/t/date.t
x TimeDate-2.30/t/format.t
x TimeDate-2.30/t/getdate.t
x TimeDate-2.30/t/lang.t
x TimeDate-2.30/lib/Date/
x TimeDate-2.30/lib/Time/
x TimeDate-2.30/lib/Time/Zone.pm
x TimeDate-2.30/lib/Date/Format.pm
x TimeDate-2.30/lib/Date/Language/
x TimeDate-2.30/lib/Date/Language.pm
x TimeDate-2.30/lib/Date/Parse.pm
x TimeDate-2.30/lib/Date/Language/Afar.pm
x TimeDate-2.30/lib/Date/Language/Amharic.pm
x TimeDate-2.30/lib/Date/Language/Austrian.pm
x TimeDate-2.30/lib/Date/Language/Brazilian.pm
x TimeDate-2.30/lib/Date/Language/Bulgarian.pm
x TimeDate-2.30/lib/Date/Language/Chinese.pm
x TimeDate-2.30/lib/Date/Language/Chinese_GB.pm
x TimeDate-2.30/lib/Date/Language/Czech.pm
x TimeDate-2.30/lib/Date/Language/Danish.pm
x TimeDate-2.30/lib/Date/Language/Dutch.pm
x TimeDate-2.30/lib/Date/Language/English.pm
x TimeDate-2.30/lib/Date/Language/Finnish.pm
x TimeDate-2.30/lib/Date/Language/French.pm
x TimeDate-2.30/lib/Date/Language/Gedeo.pm
x TimeDate-2.30/lib/Date/Language/German.pm
x TimeDate-2.30/lib/Date/Language/Greek.pm
x TimeDate-2.30/lib/Date/Language/Hungarian.pm
x TimeDate-2.30/lib/Date/Language/Icelandic.pm
x TimeDate-2.30/lib/Date/Language/Italian.pm
x TimeDate-2.30/lib/Date/Language/Norwegian.pm
x TimeDate-2.30/lib/Date/Language/Oromo.pm
x TimeDate-2.30/lib/Date/Language/Romanian.pm
x TimeDate-2.30/lib/Date/Language/Russian.pm
x TimeDate-2.30/lib/Date/Language/Russian_cp1251.pm
x TimeDate-2.30/lib/Date/Language/Russian_koi8r.pm
x TimeDate-2.30/lib/Date/Language/Sidama.pm
x TimeDate-2.30/lib/Date/Language/Somali.pm
x TimeDate-2.30/lib/Date/Language/Spanish.pm
x TimeDate-2.30/lib/Date/Language/Swedish.pm
x TimeDate-2.30/lib/Date/Language/Tigrinya.pm
x TimeDate-2.30/lib/Date/Language/TigrinyaEritrean.pm
x TimeDate-2.30/lib/Date/Language/TigrinyaEthiopian.pm
x TimeDate-2.30/lib/Date/Language/Turkish.pm
trying to find dist in /Users/vsafronov/.cpan/build/TimeDate-2.30*
---
rmd160: 78eb4306d82635d15182e16044467f5e6ffeb39a
sha256: 75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86
creating perl/p5-timedate/Portfile
candidate ExtUtils::MakeMaker
end compute dependencies
end compute dependencies

glagol:macports vsaf$ ls
cpan2port	perl

glagol:macports vsaf$ ls perl/
p5-lwp-curl	p5-net-curl	p5-timedate

glagol:macports vsaf$ cd perl/p5-timedate/

glagol:p5-timedate vsaf$ port build
Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).
--->  Computing dependencies for p5-timedate
--->  Dependencies to be installed: p5.22-timedate
--->  Fetching archive for p5.22-timedate
Error: org.macports.archivefetch for port p5.22-timedate returned: /opt/local/var/macports/incoming/verified must be writable
Error: Failed to install p5.22-timedate
Error: The following dependencies were not installed: p5.22-timedate
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port p5-timedate failed

Change History (7)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portscontrib
Description: modified (diff)
Keywords: perl removed

All ports named "p5-*" are "stub" ports: they don't install anything. Their only purpose is to depend on one of the subports that actually installs something. In the case of p5-timedate here, that subport is p5.22-timedate, because perl5.22 is currently the default version of perl in MacPorts.

The reason why port build failed is that you forgot to precede that command with sudo.

comment:2 Changed 8 years ago by thevlad@…

The howto does not say the build shall be made with sudo. How do I build p5.22-timedate if one is not existing?

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Assuming a default MacPorts installation, all builds must be done with sudo.

If you're making a new perl module port and want to install one of its subports, you can run:

sudo port install support=p5.22-something

while in the port's directory.

You might want to write to the macports-devel mailing list if you have further questions about developing portfiles.

comment:4 in reply to:  3 Changed 8 years ago by pixilla (Bradley Giesbrecht)

Replying to ryandesign@…:

sudo port install support=p5.22-something

Ryans spell checker may have been too helpful, I think he meant:

sudo port install subport=p5.22-something

comment:5 Changed 8 years ago by thevlad@…

I don't want to install. I want the howto to be correct for those who want to built a Portfile for perl modules.

and sudo does not help after all:

glagol:p5-lwp-curl vsaf$ port build Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install). ---> Computing dependencies for p5-lwp-curl Error: Dependency 'p5.22-lwp-curl' not found. To report a bug, follow the instructions in the guide:

http://guide.macports.org/#project.tickets

Error: Processing of port p5-lwp-curl failed glagol:p5-lwp-curl vsa$ sudo port build Password: Sorry, try again. Password: ---> Computing dependencies for p5-lwp-curl Error: Dependency 'p5.22-lwp-curl' not found. To report a bug, follow the instructions in the guide:

http://guide.macports.org/#project.tickets

Error: Processing of port p5-lwp-curl failed

comment:6 Changed 8 years ago by pixilla (Bradley Giesbrecht)

cd p5-lwp-curl
sudo port build subport=p5.22-lwp-curl

comment:7 Changed 8 years ago by thevlad@…

Thanx! Seems to work now.

Note: See TracTickets for help on using tickets.