Hey Rainer, Yep, that's how I figured it'd work. I may end up using $Rev$ in the Portfile, since my ports are now in our Subversion repository and that is a relatively easy way to track when they change.
Thanks for the help! On Thu, Jan 13, 2011 at 9:41 AM, Rainer Müller <[email protected]> wrote: > Hello Jon, > > On 2011-01-13 09:33 , Jon Hermansen wrote: > > I'm writing some Portfiles as an experiment for some tools I use at > > work. We keep these packages in Subversion and I am currently using > > 'fetch.type svn' to pull the sources. Is there a way that I can specify > > that my packages' version numbers are based on the checked out revision? > > Does TCL have backticks or something similar, and could I use that to > > pull this data in? > > Usually Portfiles are supposed to generate reproducible results, which > means that they are currently not meant to track a HEAD revision. > > At the moment, the version is set at the time of parsing the Portfile. > As this happens before the fetch, the svn revision number is not yet > available. > > But even if we store the real version number based on the svn revision > in the registry it wouldn't work. With portdbformat sqlite in > registry2.0, Portfiles are stored in the registry to support > activate/deactivate hooks. The version number would need to be updated > inside the Portfile to work correctly. > > I would recommend to manually update the Portfile to the current HEAD > revision or use a sed script to automate the task. > > Use something like this: > > svn.revision 123 > version ${svn.revision} > > HTH, > Rainer >
_______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
