Can't run guix upgrade when a package is installed with the --with-git-url transformation

  • Done
  • quality assurance status badge
Details
4 participants
  • Greg Hogan
  • Ludovic Courtès
  • Maxime Devos
  • SeerLite
Owner
unassigned
Submitted by
SeerLite
Severity
important
S
S
SeerLite wrote on 14 Apr 2022 18:45
(address . bug-guix@gnu.org)
55a97413-14a1-fbca-2c55-73b6e3782b47@nixnet.email
Hi!

I installed a package with --with-git-url and --with-branch to my profile:

guix install kakoune
--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

I also tried to add the same transformation options to `guix upgrade`,
but I got the same error.


Is installing packages with the --with-git-url transformation to
profiles not supported? Or is this a bug?

Ideally I'd like `guix upgrade` to remember the way in which this
package was installed and update it accordingly. In this case by
fetching the latest changes from the breaking-cleanups branch. Is this
not how this transformation option works?

Thanks :)
G
G
Greg Hogan wrote on 18 Apr 2022 21:08
(name . SeerLite)(address . seerlite@nixnet.email)(address . 54942@debbugs.gnu.org)
CA+3U0Z=DSM29tJHS9vjVuWv1P6eYAJYJpwXxG9aNpSk2MJwMeQ@mail.gmail.com
Hi,

The manual page Defining Package Variants [0] gives an example translating
command-line options into a Guix manifest. The full list of options is
found in the source [1] (including with-git-url).

[1]

Greg

On Sat, Apr 16, 2022 at 8:18 AM SeerLite via Bug reports for GNU Guix <
bug-guix@gnu.org> wrote:

Toggle quote (30 lines)
> Hi!
>
> 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
>
> I also tried to add the same transformation options to `guix upgrade`,
> but I got the same error.
>
>
> Is installing packages with the --with-git-url transformation to
> profiles not supported? Or is this a bug?
>
> Ideally I'd like `guix upgrade` to remember the way in which this
> package was installed and update it accordingly. In this case by
> fetching the latest changes from the breaking-cleanups branch. Is this
> not how this transformation option works?
>
> Thanks :)
>
>
>
>
Attachment: file
M
M
Maxime Devos wrote on 18 Apr 2022 21:24
5ed6dda13cf21f377f576a0e1718a250e7b1ba79.camel@telenet.be
SeerLite via Bug reports for GNU Guix schreef op do 14-04-2022 om 12:45
[-0400]:
Toggle quote (5 lines)
> 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

I guess the problem is that 'with-branch'/'with-commit' come before
'with-git-url' in
(untested!).

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYl261BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7j49AQDE/UkiXxT4wqAokTBG0+gI8Alf
Lz704+0mqc8N5XMJkQD/Yo/oXnWVVsY29INSWdI+ATqnTtNJjBtpmdm4woDU/QE=
=j4d8
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 29 Apr 2022 00:49
control message for bug #54942
(address . control@debbugs.gnu.org)
87o80kaknk.fsf@gnu.org
severity 54942 important
quit
L
L
Ludovic Courtès wrote on 29 Apr 2022 00:54
Re: bug#54942: Can't run guix upgrade when a package is installed with the --with-git-url transformation
(name . SeerLite)(address . seerlite@nixnet.email)(address . 54942@debbugs.gnu.org)
87fslwakf2.fsf@gnu.org
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’.
L
L
Ludovic Courtès wrote on 5 May 2022 23:58
(name . SeerLite)(address . seerlite@nixnet.email)(address . 54942-done@debbugs.gnu.org)
87ilqj63r6.fsf@gnu.org
Hi,

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

Toggle quote (25 lines)
> SeerLite <seerlite@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@2021.08.28 is not a Git
>> reference
>
> [...]
>
> Maxime Devos <maximedevos@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:

I believe this is fixed by 0f024554e63a49e20c2a7a67e928073c266bf5c5.

Please let me know if anything’s wrong!

Ludo’.
Closed
S
S
SeerLite wrote on 13 May 2022 04:47
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 54942-done@debbugs.gnu.org)
d4eaeef7-2ef9-fdb9-139b-c7cc8ce4910b@nixnet.email
On 5/5/22 17:58, Ludovic Courtès wrote:
Toggle quote (6 lines)
> I believe this is fixed by 0f024554e63a49e20c2a7a67e928073c266bf5c5.
>
> Please let me know if anything’s wrong!
>
> Ludo’.

Thank you, works perfectly now! :)
Closed
?