guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/06: size: Disable grafts.


From: Ludovic Courtès
Subject: 01/06: size: Disable grafts.
Date: Mon, 14 Mar 2016 22:35:10 +0000

civodul pushed a commit to branch master
in repository guix.

commit 3667bb6cb0f6d42ab1bb2434c1f3c1a93c6f4800
Author: Ludovic Courtès <address@hidden>
Date:   Mon Mar 14 09:54:30 2016 +0100

    size: Disable grafts.
    
    * guix/scripts/size.scm (guix-size): Parametrize '%graft?'.
---
 guix/scripts/size.scm |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm
index e999cce..8f0cb7d 100644
--- a/guix/scripts/size.scm
+++ b/guix/scripts/size.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015, 2016 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +22,7 @@
   #:use-module (guix store)
   #:use-module (guix monads)
   #:use-module (guix utils)
+  #:use-module (guix grafts)
   #:use-module (guix packages)
   #:use-module (guix derivations)
   #:use-module (gnu packages)
@@ -274,19 +275,23 @@ Report the size of PACKAGE and its dependencies.\n"))
          (leave (_ "missing store item argument\n")))
         ((file)
          (leave-on-EPIPE
-          (with-store store
-            (set-build-options store
-                               #:use-substitutes? #t
-                               #:substitute-urls urls)
+          ;; Turn off grafts because (1) hydra.gnu.org does not serve grafted
+          ;; packages, and (2) they do not make any difference on the
+          ;; resulting size.
+          (parameterize ((%graft? #f))
+            (with-store store
+              (set-build-options store
+                                 #:use-substitutes? #t
+                                 #:substitute-urls urls)
 
-            (run-with-store store
-              (mlet* %store-monad ((item    (ensure-store-item file))
-                                   (profile (store-profile item)))
-                (if map-file
-                    (begin
-                      (profile->page-map profile map-file)
-                      (return #t))
-                    (display-profile* profile)))
-              #:system system))))
+              (run-with-store store
+                (mlet* %store-monad ((item    (ensure-store-item file))
+                                     (profile (store-profile item)))
+                  (if map-file
+                      (begin
+                        (profile->page-map profile map-file)
+                        (return #t))
+                      (display-profile* profile)))
+                #:system system)))))
         ((files ...)
          (leave (_ "too many arguments\n")))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]