add subport: to state file

Ryan Schmidt ryandesign at macports.org
Thu Feb 16 13:24:03 PST 2012


On Feb 16, 2012, at 13:18, Bradley Giesbrecht wrote:

> There seems to be some odd behaviors with subports.
> 
> Do we need to add subport to the state file:
> subport: ${subport}
> 
> or have subport prefix added to worksrcdir?
> worksrcdir ${subport}/${worksrcdir}

That change already occurred a couple versions of MacPorts ago when subports were added. ${subport} is already part of ${worksrcdir}.

$ sudo port extract php54-cgi
Password:
--->  Fetching php54-cgi
--->  Verifying checksum(s) for php54-cgi
--->  Extracting php54-cgi
$ port work php54-cgi
/opt/local/var/macports/build/_Users_rschmidt_macports_users_ryandesign_ports_lang_php54/php54-cgi/work


> Example:
> Portfile:
> name subport1
> version 1.0
> 
> Portfile:
> name subport2
> version 2.0
> 
> $ sudo port extract subport1
> $ ls ./work
> subport1-1.0
> $ sudo port extract subport2
> $ ls ./work
> subport1-1.0

The work symlink is only created for the first subport you use. If you were to clean the first subport, and then try to extract the second subport, the work symlink would be created pointing to the second subport's work directory.


> If you do not clean before extract you can get unexpected results.
> 
> Things like this do not appear to work properly:
> $ sudo port test name:^subport[12]$


What port? What happens?




More information about the macports-dev mailing list