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

  • Done
  • quality assurance status badge
Details
3 participants
  • Kei Kebreau
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 7 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20171128233853.14438-1-kkebreau@posteo.net
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(-)

Toggle diff (25 lines)
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
Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29496@debbugs.gnu.org)
87tvxb1yqr.fsf@gnu.org
Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (6 lines)
> 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’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29496-done@debbugs.gnu.org)
87vahr3cni.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (12 lines)
> Kei Kebreau <kkebreau@posteo.net> 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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlogPjEACgkQ5qXuPBlG
eg0FfQ/+Ln9nlQswrpU3BhGjjFxubLskFiQllzhzMkQGAp4h0r71FzBmhulw4QuO
LaXz0inw3qYr6sDL0Jrx2+bUTniR018BSrDp4wPbVl+az4VhHVcbyL4WnnqheBp/
MBl+1r5xMtuME7lbHGIV1cUifgkdssP++/0N7mJme6GRDsTq7CiHvcDy3lPu8EWq
XBTGOC4coXZ4H8powseHkze6Vudui34Kq+74nuiKVeLZ/lSE9W8ie3UUrJN2QJsu
+eaa4qgg1BBoJ9ZtVHmVGmmyUZtSbgWoRHd5mtm4kuT8pM9sXpuz3VcidhdQxSAf
l4hWv1Rc3KsvE2nbeb96jgxnSu2G8e+9VWjsFyjpcQrGusWw7BtrxYYX4rSkFEeA
1RzKG23K2E8xIkWgtE+aJRoohVUJBgl/VVIPuSFOMeY/QTc5jZz4dj/x+GOXWt4v
oVVv7zV527VsnRNFYukSAYvtE159xl5Gf+/q/Qbocj9/BHMjowpMHowWHLtugrHR
KibYZHBXtMpTG0OoE3tqeKvjaBobYPs4GoDeeSFKmKIWTNxkkknzRZN7/eYLvNR+
JMASglzFNvHcGJGUJ/MYjV2kS9hSFSctFWHXzfDx7k/MiTjgW/AsI7Uejo8Ch0kF
sCIFlYPWCm9JX0vTDbP465+f5Tmn/CJldqhWvbQZEUmQ4DDEjsE=
=/9Ki
-----END PGP SIGNATURE-----

Closed
Leo Famulari wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
20171130231435.GA9053@jasmine.lan
On Thu, Nov 30, 2017 at 06:07:40PM +0100, Ludovic Courtès wrote:
Toggle quote (12 lines)
> Kei Kebreau <kkebreau@posteo.net> 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’.

I also missed it when this was added, but was grateful for it when
making all the Git-based packages in (gnu packages syncthing). I don't
remember how I found it now...
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlogkNoACgkQJkb6MLrK
fwhiwRAAkGXOY5nmmaeyXq1WUDGenNgZOVzuwwFEieKTm6hSajUp6euPX49qyH5/
/Lpux86+1rfPS3jNaDp9pSVgt3s6BvTzW5fh79eMKk0YTqikl9dgThuSs/Ffckc2
eQhFha/qH8Pdn+v54mBMshfjAdyySycCpKogqzCR1yPg0gFn3twNzraNyk42Iq2Y
YB/Cy6MqDoIMUmrGNjFC0DFgyw9jCvefQR5oEqDqOISS7/3lfq1LRGIAdnWntnbr
exxfsmUKI4vbEAfxEY0XyjowdW4OV8AY8fwIu0FFyk7puaIHP2GghRREkWYmITS0
rlqPUdmzJQGFR+BIPk61uCNordAXWpyQm2p7bWQaelu/Pu3Y1U5f85wFtIGSlHxy
7tesn72N1qxph5tNK2M3cqb4tPeBAfixD2SR2GIK/AVMfIBzNxLSls6KBc89SuWF
j3t62RMvIe9hmbEFjCJsfgdBiBlYxNKIcNjPBtHSffyPv+BadzpxHHL7rsKsvhMq
e2SAQrGd0fel5JnYEYjkCcsLUI6tEyjlnSkCEao24JFtGMp2YsLw41UKJBVQiB81
IrRUISkbRTDWFQZBUq2tABm6fg/3Y182s2EVem7HqnGb5Wi/wxRTMX3qnpWz8pf+
BaHSbGvs0+Ql4L36M6XoMfa6VInxmODZn4fwYX5CZu2YlQYmDjg=
=FbEO
-----END PGP SIGNATURE-----


?
Your comment

This issue is archived.

To comment on this conversation send an email to 29496@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 29496
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help