summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2014-10-13 22:34:41 +0200
committerThomas Haller <thaller@redhat.com>2014-10-20 12:38:00 +0200
commit479dd171ae040ee9a281ccb3a57ccf8517406eaa (patch)
tree545e3e0c87e180d7d3308ce4588a3b437ecd452e
parent5d763a83759eaba3a9ec72767fa6e63c0bfba146 (diff)
downloadNetworkManager-479dd171ae040ee9a281ccb3a57ccf8517406eaa.tar.gz
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
-rwxr-xr-xcontrib/fedora/rpm/build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/fedora/rpm/build.sh b/contrib/fedora/rpm/build.sh
index 6b648f3db4..e70eb21491 100755
--- a/contrib/fedora/rpm/build.sh
+++ b/contrib/fedora/rpm/build.sh
@@ -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")}"