Bug 224007 - devel/p5-MooseX-Getopt: Escape cyclic dependencies
Summary: devel/p5-MooseX-Getopt: Escape cyclic dependencies
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-perl mailing list
URL: http://search.cpan.org/~ether/MooseX-...
Keywords:
Depends on: 224006
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-30 22:33 UTC by Sergei Vyshenski
Modified: 2018-05-25 15:43 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (perl)


Attachments
patch to update the port (1.52 KB, patch)
2017-11-30 22:33 UTC, Sergei Vyshenski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Vyshenski 2017-11-30 22:33:20 UTC
Created attachment 188439 [details]
patch to update the port

- fix BUILD_DEPENDS and TEST_DEPENDS to prevent cyclic dependencies (see below)
- "portlint -AC" gives non-relevant warns.
- testport of poudriere 3.2.99.20171127 at 11.1-release-amd64 with perl 5.24.3 runs ok.
- "make test" for this port (as run from within the same poudriere's jail) say: "PASS".

port (1) 
devel/p5-MooseX-Getopt (author Karen Etheridge, maintainer perl@)
	depends from port devel/p5-MooseX-ConfigFromFile as BUILD_DEPENDS
	(but module MooseX::Getopt depends from module MooseX::ConfigFromFile only as a "test-prereq")
	http://search.cpan.org/~ether/MooseX-Getopt-0.71/
	
port (2) 
devel/p5-MooseX-ConfigFromFile (author Karen Etheridge, maintainer kuriyama@)
	depends from port devel/p5-MooseX-Types-Path-Tiny as BUILD_DEPENDS
	http://search.cpan.org/~ether/MooseX-ConfigFromFile-0.14/

port (3) 
devel/p5-MooseX-Types-Path-Tiny (author Karen Etheridge, maintainer kuriyama@)
	does NOT depend from port devel/p5-MooseX-Getopt as BUILD_DEPENDS
	(but module MooseX::Types::Path::Tiny _explicitly_ depends from module MooseX::Getopt as a "prereq")
	http://search.cpan.org/~ether/MooseX-Types-Path-Tiny-0.012/

Very often all ports (1,2,3) are installed simultaneously as a common dependensies of other ports. This may be a reason why the found inconsistency managed to stay hidden for so long. But port (3) if installed by itself is not functional in present state, due to missing run_dependency from port (1). 
	
Let "A -> B" mean that A depends from B as BUILD_DEPENDS
Let "A ? B" mean that A does NOT depend from B as BUILD_DEPENDS
	
At present we have build_dependencies of ports (1,2,3) as follows: 
	1 -> 2 -> 3 ? 1
We can not simply add a new build_dependency "devel/p5-MooseX-Getopt" to the port devel/p5-MooseX-Types-Path-Tiny. Because this way we get a cycle of dependencies as:
	1 -> 2 -> 3 -> 1
But we can arrange build_dependencies of ports (1,2,3) as follows: 
	1 ? 2 -> 3 -> 1
with all ports (1,2,3) fully functional this time.
	
For this we have to simultaneously edit two ports:

(1) devel/p5-MooseX-Getopt
	- move devel/p5-MooseX-ConfigFromFile from BUILD_DEPENDS to TEST_DEPENDS
	(see patch of this PR)

(3) devel/p5-MooseX-Types-Path-Tiny
	- add devel/p5-MooseX-Getopt to BUILD_DEPENDS
	see PR No 224006:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224006
	
Maybe exp-run is needed after editing of BOTH ports (1,3), as 
	16 ports depend from devel/p5-MooseX-Getopt,
	 4 ports depend from devel/p5-MooseX-Types-Path-Tiny