Hi,
SeerLite <seerlite@nixnet.email> skribis:
Toggle quote (11 lines)
> 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@2021.08.28 is not a Git
> reference
[...]
Maxime Devos <maximedevos@telenet.be> skribis:
Toggle quote (5 lines)
> 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:
Toggle snippet (21 lines)
$ 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@2021.08.28 is not a Git reference
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’.