GNU bug report logs - #54942
Can't run guix upgrade when a package is installed with the --with-git-url transformation

Previous Next

Package: guix;

Reported by: SeerLite <seerlite <at> nixnet.email>

Date: Thu, 14 Apr 2022 16:46:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: SeerLite <seerlite <at> nixnet.email>
Cc: 54942 <at> debbugs.gnu.org
Subject: Re: bug#54942: Can't run guix upgrade when a package is installed
 with the --with-git-url transformation
Date: Fri, 29 Apr 2022 00:54:25 +0200
Hi,

SeerLite <seerlite <at> nixnet.email> skribis:

> I installed a package with --with-git-url and --with-branch to my profile:
>
>     guix install kakoune
>     --with-git-url=kakoune=https://github.com/mawww/kakoune.git 
> --with-branch=kakoune=breaking-cleanups
>
> However, now I can't run `guix upgrade`. I get the following error:
>
>     guix upgrade: error: the source of kakoune <at> 2021.08.28 is not a Git
>     reference

[...]

Maxime Devos <maximedevos <at> telenet.be> skribis:

> I guess the problem is that 'with-branch'/'with-commit' come before
> 'with-git-url' in
> <https://git.savannah.gnu.org/cgit/guix.git/tree/guix/transformations.scm?id=237d90a7808cfdced34b34595eba16632cbcb89e#n794>
> (untested!).

My guess is rather than the profile records (or replays) transformations
in the wrong order:

--8<---------------cut here---------------start------------->8---
$ guix shell kakoune --with-git-url=kakoune=https://github.com/mawww/kakoune.git --with-branch=kakoune=breaking-cleanups --export-manifest
;; What follows is a "manifest" equivalent to the command line you gave.
;; You can store it in a file that you may then pass to any 'guix' command
;; that accepts a '--manifest' (or '-m') option.

(use-modules (guix transformations))

(define transform1
  (options->transformation
    '((with-git-url
        .
        "kakoune=https://github.com/mawww/kakoune.git")
      (with-branch . "kakoune=breaking-cleanups"))))

(packages->manifest
  (list (transform1 (specification->package "kakoune"))))
$ guix shell kakoune --with-git-url=kakoune=https://github.com/mawww/kakoune.git --with-branch=kakoune=breaking-cleanups --export-manifest > /tmp/m.scm
$ guix build -m /tmp/m.scm -v1
guix build: error: the source of kakoune <at> 2021.08.28 is not a Git reference
--8<---------------cut here---------------end--------------->8---

If you change the order of both options in the alist passed to
‘options->transformations’, it’s all good.

Now we need to find the place where things are being reversed…

Ludo’.




This bug report was last modified 3 years and 6 days ago.

Previous Next


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