[darcs-users] predist script and keyword expansion
Andrei A. Voropaev
av at simcon-mt.com
Fri Apr 22 09:04:57 UTC 2005
On Fri, Apr 22, 2005 at 10:52:05AM +0200, Andrei A. Voropaev wrote:
> Hi!
>
> I've read on the Wiki the discussion about equivivalent for keyword
> expansion present in CVS. The advice given there about using predist
> script fails. Generally in the script I would want to get the output
> from 'darcs changes', pipe it thru some command (for example perl) and
> let that command figure out the version and then update the files that
> go into the tar archive.
>
> The idea sounds simple and easy. But it fails for very stupid reason.
> When the predist script is called it sees the temporary directory with
> files that would go into the tar. So it can do autoconf for example. But
> if it tries to run darcs, then, of course, it fails because the directory
> does not have _darcs folder.
>
> The easiest solution to this problem, would be to set in the enviroment
> the path to the original repository. For example DARCS_DIST_REPO. Then
> in the script I would simply call 'darcs changes $DARCS_DIST_REPO'.
>
> One more possible enhancement in the same style. Export also the value
> given as --dist-name to the 'darcs dist'. Then I could use that value
> instead of parsing output from changelog.
>
> Does it sound reasonable? Or maybe it is already implemented?
Just wanted to add, that it is still possible via writing the makefile
rule that would export necessary variables and then making sure that
predist script is in sync with that makefile. But I feel like adding the
above changes to darcs itself would make things easier and simpler.
(After all, using specially crafted rule in Makefile I can also do what
'darcs dist' does, but here we talk about convinience :)
--
Minds, like parachutes, function best when open
More information about the darcs-users
mailing list