GNU bug report logs - #72457
[PATCH 00/15] Rewrite bootloader subsystem.

Previous Next

Package: guix-patches;

Reported by: Lilah Tascheter <lilah <at> lunabee.space>

Date: Sun, 4 Aug 2024 03:52:01 UTC

Severity: normal

Tags: patch

Fix blocked by 73202: [PATCH] Preparation for bootloader rewrite.

Full log


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

From: Lilah Tascheter <lilah <at> lunabee.space>
To: 72457 <at> debbugs.gnu.org
Cc: Herman Rimm <herman <at> rimm.ee>
Subject: Re: [bug#72457] [PATCH v5 00/15] Rewrite bootloader subsystem.
Date: Thu, 19 Sep 2024 23:44:07 -0500
untested cause my local tree's a mess rn. has the diff you requested
integrated :)

line counts are off cause it's a diff on the snippet you sent me

- lilah



diff -ru a/gnu/bootloader.scm b/gnu/bootloader.scm
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -5,22 +5,26 @@
              (seen    '()))
     (match targets
       ((target rest ...)
-       (let (type (bootloader-target-type target)))
+       (let ((type (bootloader-target-type target)))
          (when (memq type seen)
            (error loc (G_ "target with duplicate type~%") duplicate))
-         (loop rest (cons type seen)))
+         (loop rest (cons type seen))))
       (() #t))))
 
-(define-with-syntax-properties (warn-update-targets (targets
properties))
-  (let ((targets (if (list? targets) targets (list targets)))
+(define-with-syntax-properties (warn-update-targets (value
properties))
+  (let ((targets (if (list? value) value (list value)))
         (loc (source-properties->location properties)))
     (define string->target
       (match-lambda
         ((? bootloader-target? target) target)
         ((? string? s) (if (string-prefix? "/dev" s)
-                           (bootloader-target
-                             (type 'disk)
-                             (device s))
+                           (if (string-rindex s char-set:digit)
+                               (bootloader-target
+                                 (type 'part)
+                                 (device s))
+                               (bootloader-target
+                                 (type 'disk)
+                                 (device s)))
                            (bootloader-target
                              (type 'esp)
                              (offset 'root)




This bug report was last modified 237 days ago.

Previous Next


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