mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 18:10:21 +01:00
contrib/rpm: Count all predecessors in revision number
The revision number of the RPM (as build by contrib/rpm) should
be increasing so that newer packages can be installed using
`yum install` and older packages can be downgraded using
`yum downgrade`.
By counting only --first-parent, the following example turns
out wrong. Note the duplicate revision numbers.
-- A(100)----------------------------F(101)----G(102)
\ /
B(101)----C(102)----D(103)----E(104)
Just count *all* parent commits
This commit is contained in:
parent
5d763a8375
commit
479dd171ae
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ exec > >(tee "$BUILDLOG")
|
|||
exec 2>&1
|
||||
|
||||
UUID=`uuidgen`
|
||||
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list --first-parent HEAD | wc -l)}"
|
||||
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}"
|
||||
VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}"
|
||||
COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}"
|
||||
COMMIT="${COMMIT:-$(git rev-parse --verify HEAD | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue