Upgrading manifest based profile while keeping an intentionally older version of one package.

  • Open
  • quality assurance status badge
One participant
  • Martin Castillo
Submitted by
Martin Castillo
Martin Castillo wrote on 26 Mar 2023 14:01
(address . bug-guix@gnu.org)

if someone has a profile made with a manifest like

(specifications->manifest '("gcc@11"))

and they want to update it, they might run guix package -p the-profile -u

which would currently install gcc@12, or they would run something like

package -p the-profile -m manifest.scm -u

which aborts with this unintelligible message:

12 (primitive-load "/home/mcd/.config/guix/current/bin/guix")
In guix/ui.scm:
2300:7 11 (run-guix . _)
2263:10 10 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/status.scm:
850:3 8 (_)
830:4 7 (call-with-status-report _ _)
In guix/store.scm:
1298:8 6 (call-with-build-handler #<procedure 7f2b7918fdb0 at g…> …)
In guix/build/syscalls.scm:
1442:3 5 (_)
1408:4 4 (call-with-file-lock/no-wait "mani.lock" #<procedure 7…> …)
In guix/scripts/package.scm:
708:4 3 (_)
In srfi/srfi-1.scm:
460:18 2 (fold #<procedure 7f2b65ea1840 at guix/scripts/package…> …)
In guix/scripts/package.scm:
233:4 1 (transaction-upgrade-entry _ _ _)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern"
#<<manifest-entry> name: "gcc" version: "11.3.0" output: "out" item:
#<package gcc@11.3.0 gnu/packages/gcc.scm:680 7f2b66b68420>
dependencies: () search-paths: (#<<search-path-specification> variable:
"C_INCLUDE_PATH" files: ("include") separator: ":" file-type: directory
file-pattern: #f> #<<search-path-specification> variable:
"CPLUS_INCLUDE_PATH" files: ("include/c++" "include") separator: ":"
file-type: directory file-pattern: #f> #<<search-path-specification>
variable: "LIBRARY_PATH" files: ("lib" "lib64") separator: ":"
file-type: directory file-pattern: #f>) parent: #<promise #<procedure
7f2b769c0d00 at guix/profiles.scm:381:48 ()>> properties: ((provenance
(repository (version 0) (url
"3a2200e1ad2049ad7e25295e6b4e013f74dd84e2") (name guix) (introduction
(channel-introduction (version 0) (commit
"9edb3f66fd807b096b48283debdcddccfea34bad") (signer "BBB0 2DDF 2CEA F6A8
0D1D E643 A2A0 6DF2 A33A 54FA"))))))>)'.

It would be nicer if the user got a hint how to properly upgrade such a
(or any manifest based) profile instead of a backtrace. Additionally,
the documentation of guix package -u could note that.

Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 62460@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62460
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch