From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: Version numbers for VCS snapshots Date: Thu, 21 Jan 2016 13:44:24 -0500 Message-ID: <20160121184424.GB12122@jasmine> References: <874mem8mwx.fsf@gnu.org> <8737u344ov.fsf@elephly.net> <87twmjp2qs.fsf_-_@gnu.org> <56A063D1.80608@uq.edu.au> <20160121062251.GA25513@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMKDb-0000T8-H2 for guix-devel@gnu.org; Thu, 21 Jan 2016 13:44:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMKDY-0004bE-B9 for guix-devel@gnu.org; Thu, 21 Jan 2016 13:44:27 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMKDY-0004az-58 for guix-devel@gnu.org; Thu, 21 Jan 2016 13:44:24 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 657CB20B55 for ; Thu, 21 Jan 2016 13:44:23 -0500 (EST) Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel@gnu.org On Thu, Jan 21, 2016 at 10:40:41AM +0100, Ricardo Wurmus wrote: > > Leo Famulari writes: > > > That sounds good to me. There was some discussion of how much of the > > hash to keep here: > > http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00136.html > > > > I like this method that I've seen in some of the packages, because it > > keeps the version tidy while preserving the full hash: > > > > --8<---------------cut here---------------start------------->8--- > > (define-public hello > > (let ((commit "e8e46123cfe62170a2f7f79db6b471b66ae36947")) > > (package > > (name "hello") > > (version (string-append "2.10-1" (string-take commit 8))) > > (source (origin > > (method git-fetch) > > (uri (git-reference > > (url "git://git.sv.gnu.org/hello.git") > > (commit commit))) > > (sha256 > > [...] > > --8<---------------cut here---------------end--------------->8--- > > I like this approach (though I’ve been taking 9 characters of the commit > ;)). I like 10 but I wanted to match your example upthread ;) It doesn't matter so much if you preserve the full hash as in this case; you can always add more characters later. > > ~~ Ricardo