That sort of makes the operator/package builder then solely responsible
for knowing what the versions should be right? Once used it becomes no
longer pbr's job to figure out a right version, which works ok as long
as u have the appropriate infrastructure to do this correctly (and
meticulously follow this). That seems like extra work that I'd rather
not get involved in :-P
For something like a git-hash I recall there was going to be some
inbuilt pbr support for extracting a valid rpm-version that would be
valid even for git-hashes without having to start overriding the version
via PBR_VERSION. This would be the ideal case, to always have a version
that works come from PBR's version automagic code, either if its a
git-hash, a tag, or something else...
I think that code might be in an unreleased PBR code base but I'm not
100% sure (it was connected to the sem-ver code that got added since
sem-ver calculates the version and then there was a translation to a rpm
version), I don't see `python setup.py --help` having a new command that
could get this version so I'm guessing thats still the case.
-Josh
Mathieu Gagné wrote:
On 2014-11-19 4:25 PM, Kris G. Lindgren wrote:
Sure.
PBR when working off of a branch uses the git hash of the commit for the
version of the package. So you will get a version name like
openstack-nova-2014.1.2-{githash}, which is used by other tools to set
the
name of the package (such as anvil). So when you build a new package and
the githash changes the hash maybe lower than the previous hash. This
means that the newly built package will have a version number lower than
the previous package. Any package management tool will ignore the new
package because it is an earlier version of the package compared to whats
already installed. Thus you get upgrade hell. Now, PBR supports tags -
but it only supports annotated tags. So if you happen to create your tag
via: git tag and you forget the "-a", once again you have upgrade hell
because its going to default using the githash.
The behavior that I would change is to allow you to override the the
setting of the version to the git hash. How? I don¹t really care - I
could even work with a text file for the override.
AFAIK, you should be able to use the PBR_VERSION environment variable to
set your own version:
http://docs.openstack.org/developer/pbr/packagers.html
_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators