GNU bug report logs - #42212
Guix version rendered as 0.0-git in info manual

Previous Next

Package: guix;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sun, 5 Jul 2020 08:00:02 UTC

Severity: normal

Full log


Message #44 received at 42212 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: Bengt Richter <bokr <at> bokr.com>, Efraim Flashner <efraim <at> flashner.co.il>,
 42212 <at> debbugs.gnu.org, zimoun <zimon.toutoune <at> gmail.com>
Subject: Re: [PATCH 1/1] self: Use nearest tag as the version string in
 documentation.
Date: Mon, 20 Jul 2020 10:13:34 +0200
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> * guix/channels.scm (latest-channel-instance): Write nearest tag into .version
> of the checkout.
> * guix/self.scm (info-manual): Use nearest tag from .version as the version
> string while generating documentation.

Thanks for looking into it!  Two comments:

> +      ;; Write nearest tag into .version.
> +      (with-directory-excursion checkout
> +        (let ((version
> +               (call-with-port
> +                (open-pipe* OPEN_READ "./build-aux/git-version-gen" ".tarball-version")
> +                get-string-all)))
> +          (call-with-output-file ".version"
> +            (cut put-string <> version)))))
>  
>      (let* ((name     (url+commit->name (channel-url channel) commit))
>             (checkout (add-to-store store name #t "sha256" checkout

I would rather not call out to ‘git-version-gen’ and instead use (git
describe) or similar.

However, unless I’m mistaken, the output of ‘git-version-gen’ changes at
each commit, so we’d be rebuilding the manual at every commit, which is
what we should avoid here.

One way to avoid that would be to look at the latest commit that touch
doc/ instead of the latest commit overall (I think that’s what zimoun
was suggesting).  Roughly run ‘git describe’ on ‘git log doc/’, so to
speak.  (Using Guile-Git.)

Thoughts?

Ludo’.




This bug report was last modified 5 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.