Subject: bug#29496: closed (Re: [bug#29496] [PATCH] doc: Update the example VCS snapshot package definition.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 30 Nov 2017 17:23:02 +0000

Your bug report

#29496: [PATCH] doc: Update the example VCS snapshot package definition.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29496: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29496
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#29496] [PATCH] doc: Update the example VCS snapshot package definition.
From: Kei Kebreau <[email-masked]>
To: [email-masked] (Ludovic Courtès)
Cc: [email-masked]
Date: Thu, 30 Nov 2017 12:21:53 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

[email-masked] (Ludovic Courtès) writes:

> Kei Kebreau <[email-masked]> skribis:
>
>> 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.
>
> LGTM, thanks!
>
> Ludo’, who didn’t know about ‘git-version’.

Pushed! Thanks to you for reviewing and to Leo for making me this change.

Subject: [PATCH] doc: Update the example VCS snapshot package definition.
From: Kei Kebreau <[email-masked]>
To: [email-masked]
Cc: Kei Kebreau <[email-masked]>
Date: Tue, 28 Nov 2017 18:38:53 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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