GNU bug report logs - #65231
refresh: Exception in manifest is silenced, cause all packages to be selected

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 11 Aug 2023 20:05:02 UTC

Severity: normal

To reply to this bug, email your comments to 65231 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#65231; Package guix. (Fri, 11 Aug 2023 20:05:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 11 Aug 2023 20:05:03 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: refresh: Exception in manifest is silenced, cause all packages to
 be selected
Date: Fri, 11 Aug 2023 16:04:27 -0400
Hi Guix,

Consider the following manifest:

--8<---------------cut here---------------start------------->8---
(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)))
       '())))
--8<---------------cut here---------------end--------------->8---

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:

--8<---------------cut here---------------start------------->8---
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure =: Wrong type argument in position 1: "6"
--8<---------------cut here---------------end--------------->8---

-- 
Thanks,
Maxim




This bug report was last modified 266 days ago.

Previous Next


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