#31009: port command in a stub directory should select the subport automatically if no portname argument ----------------------------------+----------------------------------------- Reporter: vinc17@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.0.1 Resolution: invalid | Keywords: Port: | ----------------------------------+----------------------------------------- Comment(by dports@…): Replying to [comment:3 vinc17@…]:
I think you missed the point. The goal is that the user can modify the Portfile file (e.g. for testing) and doesn't need to choose the subport. MacPorts should do it for him if the user has typed "port destroot" only. Since building the stub itself is quite useless, one wouldn't lose any feature.
Which subport should it install? Keep in mind that the perl5 ports have four subports besides the main port (stub). And although currently the only ports using subports are the perl5/python ports, where the main port is just a stub that depends on one of the subports, that isn't necessarily true in general. (Consider the subports I proposed in #31027, for example...)
And IMHO, MacPorts should never install a port using the modified Portfile if the user hasn't requested it explicitly. What I mean here is that "port build" in a p5-xml-libxslt directory currently has the effect to install and activate the p5.12-xml-libxslt subport (at least on my machine), which is quite an unexpected behavior (upgrading the other dependencies is OK, as they shouldn't have a modified Portfile).
Actually, it'll install whatever p5.12-xml-libxslt is in your ports tree, not specifically the one from the portfile in your current directory. I'm not sure whether you'd consider that better or worse, but at least it's consistent with all other dependencies. -- Ticket URL: <https://trac.macports.org/ticket/31009#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS