From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJpTy-0007rc-SH for guix-patches@gnu.org; Tue, 28 Nov 2017 18:40:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJpTu-0004y7-Ui for guix-patches@gnu.org; Tue, 28 Nov 2017 18:40:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54874) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJpTu-0004xx-Qp for guix-patches@gnu.org; Tue, 28 Nov 2017 18:40:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJpTu-0000Es-5q for guix-patches@gnu.org; Tue, 28 Nov 2017 18:40:02 -0500 Subject: [bug#29496] [PATCH] doc: Update the example VCS snapshot package definition. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJpTG-0007q2-9K for guix-patches@gnu.org; Tue, 28 Nov 2017 18:39:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJpTD-0004Ve-39 for guix-patches@gnu.org; Tue, 28 Nov 2017 18:39:22 -0500 Received: from mout01.posteo.de ([185.67.36.65]:36349) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eJpTC-0004Tz-PG for guix-patches@gnu.org; Tue, 28 Nov 2017 18:39:19 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6247021237 for ; Wed, 29 Nov 2017 00:39:15 +0100 (CET) From: Kei Kebreau Date: Tue, 28 Nov 2017 18:38:53 -0500 Message-Id: <20171128233853.14438-1-kkebreau@posteo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29496@debbugs.gnu.org Cc: Kei Kebreau In commit ee17a9e06e636400e3354796a42ac445dbcc8f96, the helpers git-version and git-file-name removed the need to build version and file name strings manually for packages that use VCS snapshots. doc/guix.texi (Version Numbers): Use git-version and git-file-name. --- doc/guix.texi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 777ca2738..0bd6b6a79 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19880,16 +19880,14 @@ definition may look like this: (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7") (revision "1")) ;Guix package revision (package - (version (string-append "0.9-" revision "." - (string-take commit 7))) + (version (git-version "0.9" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "git://example.org/my-package.git") (commit commit))) (sha256 (base32 "1mbikn@dots{}")) - (file-name (string-append "my-package-" version - "-checkout")))) + (file-name (git-file-name name version)))) ;; @dots{} ))) @end example -- 2.15.0