From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Version strings for VCS snapshots Date: Sun, 20 Sep 2015 18:30:28 +0200 Message-ID: <87twqpkq8r.fsf_-_@gnu.org> References: <8761377ct3.fsf@elephly.net> <20150919121718.1eeccc11@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdhVa-0005OS-AP for guix-devel@gnu.org; Sun, 20 Sep 2015 12:30:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdhVX-0007kq-2x for guix-devel@gnu.org; Sun, 20 Sep 2015 12:30:34 -0400 In-Reply-To: <20150919121718.1eeccc11@openmailbox.org> (Eric Bavier's message of "Sat, 19 Sep 2015 12:17:18 -0500") 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: Eric Bavier Cc: guix-devel Eric Bavier skribis: > I realize we have no guidelines in the manual concerning the version > field for git checkouts, but I wonder whether we should, as it comes up > a bit. Several existing packages use (string-append "1.2.3." commit), > where "1.2.3" is the version of the corresponding source. One other > package uses the (string-append "1.2.3-c" commit) method, and another > uses (string-append "1.2.3-" commit. I personally prefer the "-" > notation, since it distinguishes the commit hash from the version > number (does it confuse any internal logic that assumes a package > version number is the last component of the store path following a > dash?). In this case, the "-c" seems confusing because the commit hash > itself begins with a 'c'. > > I recall some discussion previously about how it would be nice for > git-checkout package versions to still "sort" nicely. I think the goal should be to ensure lexicographic ordering, such that =E2=80=98guix package --upgrade=E2=80=99 DTRT. In practice, that means the (string-append "1.2.3." commit) should be avoided. Instead we should use (string-append "1.2.3." REV "." commit) where REV would be an integer we manually increment every time we upgrade to a newer snapshot. I don=E2=80=99t think adding =E2=80=9C-=E2=80=9D or =E2=80=9C-c=E2=80=9D be= fore the commit is useful, but I don=E2=80=99t have a strong opinion. WDYT? Ludo=E2=80=99.