On 2014-11-2 22:21 , Marko Käning wrote: > Hi Joshua, > > On 02 Nov 2014, at 04:11 , Joshua Root <[email protected]> wrote: >> Grep the ports tree for 'registry_file_registered' to find examples. One >> is gdbm. If this isn't on the PortfileRecipes page, it probably should >> be. (Although new instances of this problem should be rare thanks to >> sandboxing.) > > oh, yes, this little feature should be on wiki and Guide… > > Thanks to peeks into gdbm and canto I came up with this: > > --- > pre-activate { > foreach file {glob > ${prefix}/Library/Frameworks/R.framework/Resources/library/} { > set filepath ${prefix}/${file} > if {[file exists ${filepath}] && [registry_file_registered > ${filepath}] == "0"} { > ui_warn “Deleting residual file ${filepath}” > file delete -force $filepath > } > } > } > --- > > but it seems to NOT be the right way to go, as it results in [...]
You're not calling glob properly. You're looping over a list containing 2 elements, the first of which is 'glob'. Print out $filepath right after it's set to see this. - Josh _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
