GNU bug report logs - #43332
[PATCH] build-system: linux-module: Delete some huge items that we probably don't need.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Fri, 11 Sep 2020 11:08:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: bug#43332: closed (Re: [bug#43332] [PATCH] build-system:
 linux-module: Delete some huge items that we probably don't need.)
Date: Mon, 14 Sep 2020 08:32:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#43332: [PATCH] build-system: linux-module: Delete some huge items that we probably don't need.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 43332 <at> debbugs.gnu.org.

-- 
43332: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43332
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43332-done <at> debbugs.gnu.org
Subject: Re: [bug#43332] [PATCH] build-system: linux-module: Delete some
 huge items that we probably don't need.
Date: Mon, 14 Sep 2020 10:30:51 +0200
[Message part 3 (text/plain, inline)]
Pushed v2 to guix master as commit 2be5c2652a5fd79089048905ff6be60d74244d7b.
[Message part 4 (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] build-system: linux-module: Delete some huge items that we
 probably don't need.
Date: Fri, 11 Sep 2020 13:07:35 +0200
* guix/build-system/linux-module.scm (make-linux-module-builder): Delete
some huge items that we probably don't need.
---
 guix/build-system/linux-module.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 1077215671..ba47817596 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -68,9 +68,27 @@
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))
                      (out-lib-build (string-append out "/lib/modules/build")))
+                ;; Delete some huge items that we probably don't need.
                 ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig,
                 ;; scripts, include, ".config".
                 (copy-recursively "." out-lib-build)
+                (for-each
+                 (lambda (name)
+                   (if (file-exists? name)
+                       (delete-file-recursively name)))
+                 (map
+                  (lambda (name)
+                    (string-append out-lib-build "/" name))
+                  '(;"arch" ; 137 MB ; Note: "scripts/dtc" depends on "arch".
+                    ;"tools" ; 44 MB ; Note: is built by our 'build phase.
+                    "tools/testing" ; 14 MB
+                    "tools/perf" ; 17 MB
+                    "drivers" ; 600 MB
+                    "Documentation" ; 52 MB
+                    "fs" ; 43 MB
+                    "net" ; 33 MB
+                    "samples" ; 2 MB
+                    "sound"))) ; 40 MB
                 (let* ((linux (assoc-ref inputs "linux")))
                   (install-file (string-append linux "/System.map")
                                 out-lib-build)



This bug report was last modified 4 years and 311 days ago.

Previous Next


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