Using version-info data with multi-branch packaging workflow
bignose+hates-spam at benfinney.id.au
Sat Sep 13 02:18:15 BST 2008
John Arbash Meinel <john at arbash-meinel.com> writes:
> > How should I automatically trigger the generation of the
> > 'foo/version_info.py' file? It will be used in many places
> > throughout the code base, including in 'setup.py', so it needs to
> > be generated ideally on every commit.
> You *could* do this with a "post-branch-tip-changed" hook. Also
> realize that not just commit, but also pull and uncommit probably
> need to regenerate this file.
Okay. I've never written a hook before, so I don't know how to invoke
'bzr version-info --format=python > version_info.py' from a hook.
Will a hook need to exist on every client that runs Bazaar? My
understanding is that Bazaar doesn't yet have hooks that follow the
> You *could* have 'make' always build the file, but then it always
> has to re-link the final output (because a build product changed). I
> guess you could [overwrite the version module only if it's different
> from the existing one]
Thanks, for now I'll just regenerate it each time.
> > How can I ensure that the generated 'foo/version_info.py' file is
> > *not* generated in a branch such as 'foo.debian/'? That branch
> > should use the "upstream" version-info output, not the info
> > relating to the Debian-packaging-specific branch.
> For packaging Bazaar, we just went with using tarballs. bzr-builddeb
> can handle packaging a tarball just fine (you just don't use
If you don't use 'bzr-buildpackage --export-upstream', you then need
to manually generate the upstream source tarball. How is that done in
the Bazaar build workflow?
> Alternatively, you could work with James Westby to consider how to
> get bzr-builddeb to allow extra files to be included in the final
> exported tarball. (It may mean hacking bzr itself to change how the
> 'bzr export' command works.)
Thanks, that's an approach to be kept in reserve.
\ “What is it that makes a complete stranger dive into an icy |
`\ river to save a solid gold baby? Maybe we'll never know.” —Jack |
_o__) Handey |
More information about the bazaar