GNU bug report logs - #33719
Bug: Unable to use an inferior package as a kernel in the system configuration

Previous Next

Package: guix;

Reported by: <pkill9 <at> runbox.com>

Date: Wed, 12 Dec 2018 17:34:01 UTC

Severity: normal

Done: <pkill9 <at> runbox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33719 in the body.
You can then email your comments to 33719 AT debbugs.gnu.org in the normal way.

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#33719; Package guix. (Wed, 12 Dec 2018 17:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to <pkill9 <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 12 Dec 2018 17:34:02 GMT) Full text and rfc822 format available.

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

From: <pkill9 <at> runbox.com>
To: "bug-guix" <bug-guix <at> gnu.org>
Subject: Bug: Unable to use an inferior package as a kernel in the system
 configuration
Date: Wed, 12 Dec 2018 17:33:35 +0000 (GMT)
When putting an inferior package in the 'kernel' field of the system configuration, Guix fails with

```
gnu/system.scm:909:35: In procedure kernel->boot-label:
In procedure package-name: Wrong type argument: #<inferior-package linux-libre <at> 4.18.15 4182150>
```

The issue is very simple: The function that creates the text for a boot entry (`kernel->boot-label`) gets the name and version of the kernel using the functions `package-name` and `package-version`, which are incompatible with inferior packages.
The `(guix inferior)` module provides equivalent functions for inferior packages: `inferior-package-name` and `inferior-package-version`. Here's a patch that demonstrates which part needs to be changed:

```
diff --git a/gnu/system.scm b/gnu/system.scm
index a5a8f40d6..3c3fe94ad 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -21,6 +21,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

 (define-module (gnu system)
+  #:use-module (guix inferior)
   #:use-module (guix store)
   #:use-module (guix monads)
   #:use-module (guix gexp)
@@ -906,8 +907,8 @@ listed in OS.  The C library expects to find it under
 (define (kernel->boot-label kernel)
   "Return a label for the bootloader menu entry that boots KERNEL."
   (string-append "GNU with "
-                 (string-titlecase (package-name kernel)) " "
-                 (package-version kernel)
+                 (string-titlecase (inferior-package-name kernel)) " "
+                 (inferior-package-version kernel)
                  " (beta)"))

 (define (store-file-system file-systems)
```

I tested this and it made inferior-packages able to be used as a kernel - I'm running that kernel on my system now, I wrote a guide on how to do that if anyone's interested, which includes an example of how to add it to your system configuration: http://miha.info/2018-Dec-09/how-to-add-a-modified-kernel-built-using-a-previous-guix-commit-to-your-system-configuration/

I assume the solution is to modify the `kernel->boot-label` function to check if the package passed to it is an inferior package, and use the compatible functions to get the name and version of the package depending on if it's inferior or not, however I don't know scheme/guile well enough to do this, and I don't know if this is the correct solution to do, so it would be great if someone could else could create a patch that fixes this.



Reply sent to <pkill9 <at> runbox.com>:
You have taken responsibility. (Sat, 09 Feb 2019 10:59:02 GMT) Full text and rfc822 format available.

Notification sent to <pkill9 <at> runbox.com>:
bug acknowledged by developer. (Sat, 09 Feb 2019 10:59:02 GMT) Full text and rfc822 format available.

Message #10 received at 33719-done <at> debbugs.gnu.org (full text, mbox):

From: <pkill9 <at> runbox.com>
To: "33719-done" <33719-done <at> debbugs.gnu.org>
Subject: Bug: Unable to use an inferior package as a kernel in the system
 configuration
Date: Sat, 09 Feb 2019 10:58:16 +0000 (GMT)
Fixed with guix commit bdc61ff97d26d5d87020d07dfd43c0a552bd3449



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 Mar 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 43 days ago.

Previous Next


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