refresh: Exception in manifest is silenced, cause all packages to be selected

  • Open
  • quality assurance status badge
Details
One participant
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 11 Aug 2023 22:04
(name . bug-guix)(address . bug-guix@gnu.org)
87sf8pl510.fsf@gmail.com
Hi Guix,

Consider the following manifest:

Toggle snippet (25 lines)
(use-modules (guix packages)
(guix profiles)
(guix utils)
(gnu packages))

(define %qt-major-version "6")

(manifest
(map package->manifest-entry
(fold-packages
(lambda (package lst)
(let ((uri (and=> (package-source package)
(lambda (x)
(and (origin? x)
(origin-uri x))))))
(if (and uri
(string? uri)
(string-prefix? "mirror://qt/" uri)
(= %qt-major-version (version-major
(package-version package))))
(cons package lst)
lst)))
'())))

There's a subtle bug in it, which is the '=' function which is used
instead of 'string=?'. I'd expect 'guix refresh -m qt-manifest.scm' to
let this exception interrupt execution, but instead it proceeds to
refresh all (?) the packages (taking a long time to compute).

At the REPL, the error is reported as:

Toggle snippet (4 lines)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure =: Wrong type argument in position 1: "6"

--
Thanks,
Maxim
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 65231
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