[Reproducible-commits] [dpkg] 01/02: Add support of tildes in dpkg's version

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.16.1.1_bpo60+1
in repository dpkg.

commit 63227e05807967d414c5b85b985a7001ba13d278
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Sat Oct 29 20:40:23 2011 +0200

    Add support of tildes in dpkg's version
    
    Dpkg's version is generated from the name of the closest git tag with the
    help of get-version. But tag names can't contain tildes. Thus we use
    underscore instead. This commit fixes get-version to replace underscores
    back to tildes.
---
 get-version | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/get-version b/get-version
index ed7e624..36a2a27 100755
--- a/get-version
+++ b/get-version
@@ -22,8 +22,9 @@ if [ -f .dist-version ]; then
   # Get the version from the file distributed in the tarball.
   version=$(cat .dist-version)
 elif [ -d .git ]; then
-  # Ger the version from the git repository.
-  version=$(git describe --abbrev=4 HEAD 2>/dev/null)
+  # Get the version from the git repository. Since tags can't contain
+  # tildes, we use underscore instead. Reverse that switch here.
+  version=$(git describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/_/~/g')
 
   # Check if we are on a dirty checkout.
   git update-index --refresh -q >/dev/null

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list