unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 48313@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#48313: [1.3.0rc2] ‘guix describe’ prints nothing and exits with 0
Date: Sun, 09 May 2021 16:47:59 +0200	[thread overview]
Message-ID: <87fsyw6k0w.fsf@gnu.org> (raw)
In-Reply-To: <87pmy06kny.fsf@inria.fr> ("Ludovic Courtès"'s message of "Sun, 09 May 2021 16:34:09 +0200")

Ludovic Courtès <ludo@gnu.org> skribis:

> In the 1.3.0rc2 VM image, ‘guix describe’ prints nothing and exits with
> 0 (success).  This is with /run/current-system/profile/bin/guix.
> ‘strace’ shows that it parses /run/current-system/profile/manifest,
> which does not contain provenance information.

In RC1, ‘current-profile’ from (guix describe) returns #f.
Thus, ‘current-channels’ returns channel metadata from (guix config).

In RC2, ‘current-profile’ returns /run/current-system/profile.
Thus, ‘current-channels’ returns metadata from profile entries, but
there’s none.

The different ‘current-profile’ behavior stems from this condition:

--8<---------------cut here---------------start------------->8---
(define current-profile
  (mlambda ()
    "Return the profile (created by 'guix pull') the calling process lives in,
or #f if this is not applicable."
    (match initial-program-arguments
      ((program . _)
       (and (string-suffix? "/bin/guix" program)  ;<------ HERE!
            ;; Note: We want to do _lexical dot-dot resolution_.  Using ".."
            ;; for real would instead take us into the /gnu/store directory
            ;; that ~/.config/guix/current/bin points to, whereas we want to
            ;; obtain ~/.config/guix/current.
            (let ((candidate (dirname (dirname program))))
              (and (file-exists? (string-append candidate "/manifest"))
                   candidate)))))))
--8<---------------cut here---------------end--------------->8---

Prior to c47f3fc13562d82edfd2d47342574154c452843a, PROGRAM was
“.guix-real” (hence the #f return value), but now it’s “guix”.

Ludo’.




  reply	other threads:[~2021-05-09 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09 14:34 bug#48313: [1.3.0rc2] ‘guix describe’ prints nothing and exits with 0 Ludovic Courtès
2021-05-09 14:47 ` Ludovic Courtès [this message]
2021-05-09 21:51 ` Ludovic Courtès
2021-05-10  0:46   ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsyw6k0w.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48313@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).