all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
@ 2018-11-26 21:43 Ludovic Courtès
  2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
  2018-11-27  7:50 ` [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Clément Lassieur
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-26 21:43 UTC (permalink / raw)
  To: 33519; +Cc: rekado

Hello Guix!

These patches add UI hints so that grafting derivations can be
distinguished from more expensive derivations, as suggested by
Ricardo a while back.

The end result is something like this:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env  guix package -i libreoffice
The following package will be upgraded:
   libreoffice  6.1.3.2 → 6.1.3.2       /gnu/store/665s4yzjdih5hfyqj25hflxf838ddvhn-libreoffice-6.1.3.2

substitute: updating substitutes from 'https://berlin.guixsd.org'... 100.0%
substitute: updating substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/4007l9zq7aaagh3na9w9674z6mdsba0x-profile.drv
   /gnu/store/zlkrnrp83zn8zqm9zblx1a4dhqszp2p2-info-dir.drv
   /gnu/store/yrji9qkrsijvc8r67i0zqrjsgq0w7y61-glib-schemas.drv
   /gnu/store/ym5yani65vhq46mbnh09v4nj3xp6g9jz-xdg-desktop-database.drv
   /gnu/store/wrqgnm8ys59g5darnscx452vgj79hk7g-ca-certificate-bundle.drv
   /gnu/store/srxlcgzhilgy7gf08cdm05r3sbg7fhb8-gtk-icon-themes.drv
   /gnu/store/mh9lli57ji66k4vs9hspw59pfkjd12x8-fonts-dir.drv
   /gnu/store/fwg6dbirzpcpyn6vridb6acf7h8v8llx-gtk-im-modules.drv
   /gnu/store/29240dgzra7fgllk76jixafbzfzkaqh1-xdg-mime-database.drv
   /gnu/store/ag493qzyl9gghmpc1v24zx7f377qnara-manual-database.drv
129.4 MB will be downloaded:
   /gnu/store/y97qqcmkizk3vc9jfi52yn6r4x2s88nc-libreoffice-6.1.3.2
The following grafts will be made:
   /gnu/store/aa9fn1r87jq7j56nh5jpj94g81bsavzx-texinfo-6.5.drv
   /gnu/store/7s9q5h53j6jiig2z39xp3304z3fpfvk4-glib-2.56.0.drv
   /gnu/store/38a90nvqqvgwj44a7ygrc05f9rspnk5q-gtk+-3.22.30.drv
   […]
   /gnu/store/yz11x1glpgigflw0rwy6g1z1fk7lamx0-orcus-0.13.4.drv
   /gnu/store/4vysnvfh5010b91mvc30m81izg2x1vrr-libreoffice-6.1.3.2.drv
applying 1 graft for /gnu/store/7s9q5h53j6jiig2z39xp3304z3fpfvk4-glib-2.56.0.drv...
downloading from https://berlin.guixsd.org/nar/gzip/y97qqcmkizk3vc9jfi52yn6r4x2s88nc-libreoffice-6.1.3.2...
 libreoffice-6.1.3.2  123.4MiB          33.3MiB/s 00:04 [##################] 100.0%

applying 1 graft for /gnu/store/1w75n56p6sz9rlpqi7wdp4f6mzdxxscq-cyrus-sasl-2.1.26.drv...
applying 1 graft for /gnu/store/cckw8wfjgx78ppmxki8f9hsqyb9rljwi-dbus-glib-0.108.drv...
applying 1 graft for /gnu/store/habjnpc834xjmrjzzahld703cg6sxnf4-hunspell-1.6.2.drv...
applying 2 grafts for /gnu/store/68cldhib78yrw2az4jmbflpx8vkk95rd-gconf-3.2.6.drv...
applying 1 graft for /gnu/store/x2v583bsp0d2mp7bgc37amb0ga2am3bc-hyphen-2.8.8.drv...
applying 1 graft for /gnu/store/7albjprbwf9gynspvwy7caq6rmmvvg27-libcdr-0.1.4.drv...
applying 1 graft for /gnu/store/mkvhlm3663yanyzyl4xcx9kpmnaxi6x2-libfreehand-0.1.2.drv...
applying 1 graft for /gnu/store/6mk42x7awyyldpb05i4bpjl9pmyqjxfi-libwpg-0.3.2.drv...
applying 1 graft for /gnu/store/qgiqzsf6mw6cr302sbw5y0lz3vskcfwc-libxkbcommon-0.8.0.drv...
applying 3 grafts for /gnu/store/q0wcsn269hv5lc7fmr9wcc0b1z46zzhx-libxtst-1.2.3.drv...
applying 2 grafts for /gnu/store/9k2ppp34g4gagfqwnvrnc1w28qrvxnz2-libxv-1.0.11.drv...
applying 5 grafts for /gnu/store/dxzsf8k6dhpz88x18afxgfgr5y85ljq9-at-spi2-core-2.26.2.drv...
applying 6 grafts for /gnu/store/7q39bgqm87xikd5bjbp8zd99hf4mdm13-gst-plugins-base-1.14.2.drv...
applying 6 grafts for /gnu/store/xf7cnfzx6mm9qic3rnzabiif1c5q0wr1-at-spi2-atk-2.26.1.drv...
[…]
--8<---------------cut here---------------end--------------->8---

Overall this makes operations more transparent.  Advanced users
will know what this means, and hopefully others will notice that
grafting is a relatively fast operation and discover that it has to
do with security updates.

Thoughts?

Ludo’.

Ludovic Courtès (4):
  derivations: Add properties.
  grafts: Record metadata as derivation properties.
  status: Report grafting derivations specially.
  ui: 'show-what-to-build' reports grafts separately.

 doc/guix.texi         |  8 ++++++--
 guix/derivations.scm  | 30 +++++++++++++++++++++++++-----
 guix/gexp.scm         |  4 +++-
 guix/grafts.scm       |  7 ++++++-
 guix/status.scm       | 14 +++++++++++++-
 guix/ui.scm           | 26 +++++++++++++++++++++++---
 tests/derivations.scm | 10 ++++++++++
 tests/gexp.scm        | 10 +++++++++-
 tests/grafts.scm      | 13 ++++++++-----
 9 files changed, 103 insertions(+), 19 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 1/4] derivations: Add properties.
  2018-11-26 21:43 [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Ludovic Courtès
@ 2018-11-26 21:47 ` Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 2/4] grafts: Record metadata as derivation properties Ludovic Courtès
                     ` (2 more replies)
  2018-11-27  7:50 ` [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Clément Lassieur
  1 sibling, 3 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-26 21:47 UTC (permalink / raw)
  To: 33519; +Cc: rekado

* guix/derivations.scm (derivation): Add #:properties parameter.
[user+system-env-vars]: Honor it.
(derivation-properties): New procedure.
(build-expression->derivation): Add #:properties and pass it to
'derivation'.
* guix/gexp.scm (gexp->derivation): Likewise.
* tests/derivations.scm ("derivation-properties"): New test.
* tests/gexp.scm ("gexp->derivation properties"): New test.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
---
 doc/guix.texi         |  8 ++++++--
 guix/derivations.scm  | 30 +++++++++++++++++++++++++-----
 guix/gexp.scm         |  4 +++-
 tests/derivations.scm | 10 ++++++++++
 tests/gexp.scm        | 10 +++++++++-
 5 files changed, 53 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 917a3e9d57..c040a8531a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5060,7 +5060,7 @@ a derivation is the @code{derivation} procedure:
   [#:system (%current-system)] [#:references-graphs #f] @
   [#:allowed-references #f] [#:disallowed-references #f] @
   [#:leaked-env-vars #f] [#:local-build? #f] @
-  [#:substitutable? #t]
+  [#:substitutable? #t] [#:properties '()]
 Build a derivation with the given arguments, and return the resulting
 @code{<derivation>} object.
 
@@ -5097,6 +5097,9 @@ When @var{substitutable?} is false, declare that substitutes of the
 derivation's output should not be used (@pxref{Substitutes}).  This is
 useful, for instance, when building packages that capture details of the
 host CPU instruction set.
+
+@var{properties} must be an association list describing ``properties'' of the
+derivation.  It is kept as-is, uninterpreted, in the derivation.
 @end deffn
 
 @noindent
@@ -5790,7 +5793,8 @@ information about monads.)
        [#:leaked-env-vars #f] @
        [#:script-name (string-append @var{name} "-builder")] @
        [#:deprecation-warnings #f] @
-       [#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f]
+       [#:local-build? #f] [#:substitutable? #t] @
+       [#:properties '()] [#:guile-for-build #f]
 Return a derivation @var{name} that runs @var{exp} (a gexp) with
 @var{guile-for-build} (a derivation) on @var{system}; @var{exp} is
 stored in a file called @var{script-name}.  When @var{target} is true,
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 7afecb10cc..f6176a78fd 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -80,6 +80,7 @@
             substitutable-derivation?
             substitution-oracle
             derivation-hash
+            derivation-properties
 
             read-derivation
             read-derivation-from-file
@@ -681,7 +682,8 @@ name of each input with that input's hash."
                      references-graphs
                      allowed-references disallowed-references
                      leaked-env-vars local-build?
-                     (substitutable? #t))
+                     (substitutable? #t)
+                     (properties '()))
   "Build a derivation with the given arguments, and return the resulting
 <derivation> object.  When HASH and HASH-ALGO are given, a
 fixed-output derivation is created---i.e., one whose result is known in
@@ -708,7 +710,10 @@ for offloading and should rather be built locally.  This is the case for small
 derivations where the costs of data transfers would outweigh the benefits.
 
 When SUBSTITUTABLE? is false, declare that substitutes of the derivation's
-output should not be used."
+output should not be used.
+
+PROPERTIES must be an association list describing \"properties\" of the
+derivation.  It is kept as-is, uninterpreted, in the derivation."
   (define (add-output-paths drv)
     ;; Return DRV with an actual store path for each of its output and the
     ;; corresponding environment variable.
@@ -763,6 +768,10 @@ output should not be used."
                             `(("impureEnvVars"
                                . ,(string-join leaked-env-vars)))
                             '())
+                      ,@(match properties
+                          (() '())
+                          (lst `(("guix properties"
+                                  . ,(object->string properties)))))
                       ,@env-vars)))
       (match references-graphs
         (((file . path) ...)
@@ -851,6 +860,14 @@ long-running processes that know what they're doing.  Use with care!"
   (invalidate-memoization! derivation-path->base16-hash)
   (hash-clear! %derivation-cache))
 
+(define derivation-properties
+  (mlambdaq (drv)
+    "Return the property alist associated with DRV."
+    (match (assoc "guix properties"
+                  (derivation-builder-environment-vars drv))
+      ((_ . str) (call-with-input-string str read))
+      (#f        '()))))
+
 (define* (map-derivation store drv mapping
                          #:key (system (%current-system)))
   "Given MAPPING, a list of pairs of derivations, return a derivation based on
@@ -1129,7 +1146,8 @@ they can refer to each other."
                                        references-graphs
                                        allowed-references
                                        disallowed-references
-                                       local-build? (substitutable? #t))
+                                       local-build? (substitutable? #t)
+                                       (properties '()))
   "Return a derivation that executes Scheme expression EXP as a builder
 for derivation NAME.  INPUTS must be a list of (NAME DRV-PATH SUB-DRV)
 tuples; when SUB-DRV is omitted, \"out\" is assumed.  MODULES is a list
@@ -1149,7 +1167,8 @@ EXP is built using GUILE-FOR-BUILD (a derivation).  When GUILE-FOR-BUILD is
 omitted or is #f, the value of the `%guile-for-build' fluid is used instead.
 
 See the `derivation' procedure for the meaning of REFERENCES-GRAPHS,
-ALLOWED-REFERENCES, DISALLOWED-REFERENCES, LOCAL-BUILD?, and SUBSTITUTABLE?."
+ALLOWED-REFERENCES, DISALLOWED-REFERENCES, LOCAL-BUILD?, SUBSTITUTABLE?,
+and PROPERTIES."
   (define guile-drv
     (or guile-for-build (%guile-for-build)))
 
@@ -1277,7 +1296,8 @@ ALLOWED-REFERENCES, DISALLOWED-REFERENCES, LOCAL-BUILD?, and SUBSTITUTABLE?."
                 #:allowed-references allowed-references
                 #:disallowed-references disallowed-references
                 #:local-build? local-build?
-                #:substitutable? substitutable?)))
+                #:substitutable? substitutable?
+                #:properties properties)))
 
 \f
 ;;;
diff --git a/guix/gexp.scm b/guix/gexp.scm
index f33fb198e4..786e378308 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -631,6 +631,7 @@ names and file names suitable for the #:allowed-references argument to
                            allowed-references disallowed-references
                            leaked-env-vars
                            local-build? (substitutable? #t)
+                           (properties '())
 
                            ;; TODO: This parameter is transitional; it's here
                            ;; to avoid a full rebuild.  Remove it on the next
@@ -800,7 +801,8 @@ The other arguments are as for 'derivation'."
                       #:disallowed-references disallowed
                       #:leaked-env-vars leaked-env-vars
                       #:local-build? local-build?
-                      #:substitutable? substitutable?))))
+                      #:substitutable? substitutable?
+                      #:properties properties))))
 
 (define* (gexp-inputs exp #:key native?)
   "Return the input list for EXP.  When NATIVE? is true, return only native
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 159a6971b3..5f294c1827 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -1132,6 +1132,16 @@
                                     ((p2 . _)
                                      (string<? p1 p2)))))))))))))
 
+(test-equal "derivation-properties"
+  (list '() '((type . test)))
+  (let ((drv1 (build-expression->derivation %store "bar"
+                                            '(mkdir %output)))
+        (drv2 (build-expression->derivation %store "foo"
+                                           '(mkdir %output)
+                                           #:properties '((type . test)))))
+    (list (derivation-properties drv1)
+          (derivation-properties drv2))))
+
 (test-equal "map-derivation"
   "hello"
   (let* ((joke (package-derivation %store guile-1.8))
diff --git a/tests/gexp.scm b/tests/gexp.scm
index ab60bdab68..7ae9201c81 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -476,7 +476,15 @@
     (return (and (string=? (readlink (string-append out "/foo")) guile)
                  (string=? (readlink out2) file)
                  (equal? refs (list (dirname (dirname guile))))
-                 (equal? refs2 (list file))))))
+                 (equal? refs2 (list file))
+                 (null? (derivation-properties drv))))))
+
+(test-assertm "gexp->derivation properties"
+  (mlet %store-monad ((drv (gexp->derivation "foo"
+                                             #~(mkdir #$output)
+                                             #:properties '((type . test)))))
+    (return (equal? '((type . test))
+                    (derivation-properties drv)))))
 
 (test-assertm "gexp->derivation vs. grafts"
   (mlet* %store-monad ((graft?  (set-grafting #f))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 2/4] grafts: Record metadata as derivation properties.
  2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
@ 2018-11-26 21:47   ` Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 3/4] status: Report grafting derivations specially Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 4/4] ui: 'show-what-to-build' reports grafts separately Ludovic Courtès
  2 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-26 21:47 UTC (permalink / raw)
  To: 33519; +Cc: rekado

* guix/grafts.scm (graft-derivation/shallow): Pass #:properties to
'build-expression->derivation'.
* tests/grafts.scm ("graft-derivation, grafted item is a direct
dependency"): Check the value returned by 'derivation-properties'.
---
 guix/grafts.scm  |  7 ++++++-
 tests/grafts.scm | 13 ++++++++-----
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/guix/grafts.scm b/guix/grafts.scm
index 01e245d8eb..63f384555b 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -123,6 +123,10 @@ are not recursively applied to dependencies of DRV."
   (define add-label
     (cut cons "x" <>))
 
+  (define properties
+    `((type . graft)
+      (graft (count . ,(length grafts)))))
+
   (match grafts
     ((($ <graft> sources source-outputs targets target-outputs) ...)
      (let ((sources (zip sources source-outputs))
@@ -140,7 +144,8 @@ are not recursively applied to dependencies of DRV."
                                                 ,@(append (map add-label sources)
                                                           (map add-label targets)))
                                      #:outputs outputs
-                                     #:local-build? #t)))))
+                                     #:local-build? #t
+                                     #:properties properties)))))
 (define (item->deriver store item)
   "Return two values: the derivation that led to ITEM (a store item), and the
 name of the output of that derivation ITEM corresponds to (for example
diff --git a/tests/grafts.scm b/tests/grafts.scm
index abb074d628..f85f3c6913 100644
--- a/tests/grafts.scm
+++ b/tests/grafts.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,7 +51,8 @@
 \f
 (test-begin "grafts")
 
-(test-assert "graft-derivation, grafted item is a direct dependency"
+(test-equal "graft-derivation, grafted item is a direct dependency"
+  '((type . graft) (graft (count . 2)))
   (let* ((build `(begin
                    (mkdir %output)
                    (chdir %output)
@@ -76,14 +77,16 @@
                                             (origin %mkdir)
                                             (replacement two))))))
     (and (build-derivations %store (list grafted))
-         (let ((two     (derivation->output-path two))
-               (grafted (derivation->output-path grafted)))
+         (let ((properties (derivation-properties grafted))
+               (two        (derivation->output-path two))
+               (grafted    (derivation->output-path grafted)))
            (and (string=? (format #f "foo/~a/bar" two)
                           (call-with-input-file (string-append grafted "/text")
                             get-string-all))
                 (string=? (readlink (string-append grafted "/sh")) one)
                 (string=? (readlink (string-append grafted "/self"))
-                          grafted))))))
+                          grafted)
+                properties)))))
 
 (test-assert "graft-derivation, grafted item uses a different name"
   (let* ((build   `(begin
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 3/4] status: Report grafting derivations specially.
  2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 2/4] grafts: Record metadata as derivation properties Ludovic Courtès
@ 2018-11-26 21:47   ` Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 4/4] ui: 'show-what-to-build' reports grafts separately Ludovic Courtès
  2 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-26 21:47 UTC (permalink / raw)
  To: 33519; +Cc: rekado

* guix/status.scm (print-build-event): In 'build-started' event handler,
check the properties of DRV and handle 'graft' derivations specially.
---
 guix/status.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/guix/status.scm b/guix/status.scm
index 2ceb56788a..868bfdca21 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -325,7 +325,19 @@ addition to build events."
     (display "\r" port))                          ;erase the spinner
   (match event
     (('build-started drv . _)
-     (format port (info (G_ "building ~a...")) drv)
+     (let ((properties (derivation-properties
+                        (read-derivation-from-file drv))))
+       (match (assq-ref properties 'type)
+         ('graft
+           (let ((count (match (assq-ref properties 'graft)
+                          (#f  0)
+                          (lst (or (assq-ref lst 'count) 0)))))
+             (format port (info (N_ "applying ~a graft for ~a..."
+                                    "applying ~a grafts for ~a..."
+                                    count))
+                     count drv)))
+         (_
+          (format port (info (G_ "building ~a...")) drv))))
      (newline port))
     (('build-succeeded drv . _)
      (when (or print-log? (not (extended-build-trace-supported?)))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 4/4] ui: 'show-what-to-build' reports grafts separately.
  2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 2/4] grafts: Record metadata as derivation properties Ludovic Courtès
  2018-11-26 21:47   ` [bug#33519] [PATCH 3/4] status: Report grafting derivations specially Ludovic Courtès
@ 2018-11-26 21:47   ` Ludovic Courtès
  2 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-26 21:47 UTC (permalink / raw)
  To: 33519; +Cc: rekado

* guix/ui.scm (graft-derivation?): New procedure.
(show-what-to-build): Distinguish among BUILD derivations that match
'graft-derivation?'.  Report them separately.
---
 guix/ui.scm | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 96f403acf5..60636edac0 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -816,6 +816,12 @@ warning."
       (warning (G_ "at least ~,1h MB needed but only ~,1h MB available in ~a~%")
                (/ need 1e6) (/ free 1e6) directory))))
 
+(define (graft-derivation? drv)
+  "Return true if DRV is definitely a graft derivation, false otherwise."
+  (match (assq-ref (derivation-properties drv) 'type)
+    ('graft #t)
+    (_ #f)))
+
 (define* (show-what-to-build store drv
                              #:key dry-run? (use-substitutes? #t)
                              (mode (build-mode normal)))
@@ -865,7 +871,11 @@ report what is prerequisites are available for download."
                                           (append-map
                                            substitutable-references
                                            download))))
-                     download)))
+                     download))
+                ((graft build)
+                 (partition (compose graft-derivation?
+                                     read-derivation-from-file)
+                            build)))
     (define installed-size
       (reduce + 0 (map substitutable-nar-size download)))
 
@@ -898,7 +908,12 @@ report what is prerequisites are available for download."
                           "~:[The following files would be downloaded:~%~{   ~a~%~}~;~]"
                           (length download))
                       (null? download)
-                      (map substitutable-path download))))
+                      (map substitutable-path download)))
+          (format (current-error-port)
+                  (N_ "~:[The following graft would be made:~%~{   ~a~%~}~;~]"
+                      "~:[The following grafts would be made:~%~{   ~a~%~}~;~]"
+                      (length graft))
+                  (null? graft) graft))
         (begin
           (format (current-error-port)
                   (N_ "~:[The following derivation will be built:~%~{   ~a~%~}~;~]"
@@ -918,7 +933,12 @@ report what is prerequisites are available for download."
                           "~:[The following files will be downloaded:~%~{   ~a~%~}~;~]"
                           (length download))
                       (null? download)
-                      (map substitutable-path download)))))
+                      (map substitutable-path download)))
+          (format (current-error-port)
+                  (N_ "~:[The following graft will be made:~%~{   ~a~%~}~;~]"
+                      "~:[The following grafts will be made:~%~{   ~a~%~}~;~]"
+                      (length graft))
+                  (null? graft) graft)))
 
     (check-available-space installed-size)
 
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
  2018-11-26 21:43 [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Ludovic Courtès
  2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
@ 2018-11-27  7:50 ` Clément Lassieur
  2018-11-27  8:05   ` Ricardo Wurmus
  2018-11-27  8:27   ` Ludovic Courtès
  1 sibling, 2 replies; 10+ messages in thread
From: Clément Lassieur @ 2018-11-27  7:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: rekado, 33519

Ludovic Courtès <ludo@gnu.org> writes:

> Hello Guix!
>
> These patches add UI hints so that grafting derivations can be
> distinguished from more expensive derivations, as suggested by
> Ricardo a while back.

[...]

> Overall this makes operations more transparent.  Advanced users
> will know what this means, and hopefully others will notice that
> grafting is a relatively fast operation and discover that it has to
> do with security updates.
>
> Thoughts?

This is awesome!  And I imagine it will allow to distinguish packages
and tests in Cuirass :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
  2018-11-27  7:50 ` [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Clément Lassieur
@ 2018-11-27  8:05   ` Ricardo Wurmus
  2018-11-28  9:41     ` Ludovic Courtès
  2018-11-30 11:56     ` Clément Lassieur
  2018-11-27  8:27   ` Ludovic Courtès
  1 sibling, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2018-11-27  8:05 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: 33519


Clément Lassieur <clement@lassieur.org> writes:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello Guix!
>>
>> These patches add UI hints so that grafting derivations can be
>> distinguished from more expensive derivations, as suggested by
>> Ricardo a while back.
>
> [...]
>
>> Overall this makes operations more transparent.  Advanced users
>> will know what this means, and hopefully others will notice that
>> grafting is a relatively fast operation and discover that it has to
>> do with security updates.
>>
>> Thoughts?
>
> This is awesome!

I agree!  This looks great.

> And I imagine it will allow to distinguish packages
> and tests in Cuirass :-)

How would that work?

-- 
Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
  2018-11-27  7:50 ` [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Clément Lassieur
  2018-11-27  8:05   ` Ricardo Wurmus
@ 2018-11-27  8:27   ` Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-27  8:27 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: rekado, 33519

Clément Lassieur <clement@lassieur.org> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello Guix!
>>
>> These patches add UI hints so that grafting derivations can be
>> distinguished from more expensive derivations, as suggested by
>> Ricardo a while back.
>
> [...]
>
>> Overall this makes operations more transparent.  Advanced users
>> will know what this means, and hopefully others will notice that
>> grafting is a relatively fast operation and discover that it has to
>> do with security updates.
>>
>> Thoughts?
>
> This is awesome!

Glad you like it.  :-)

> And I imagine it will allow to distinguish packages and tests in
> Cuirass :-)

It’s tempting to use properties for all sorts of things (like we could
distinguish profile hooks, too), so yes, we could do more of that, but I
feel we should not go too far either.  :-)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
  2018-11-27  8:05   ` Ricardo Wurmus
@ 2018-11-28  9:41     ` Ludovic Courtès
  2018-11-30 11:56     ` Clément Lassieur
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-11-28  9:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Clément Lassieur, 33519

Pushed!

  d4aa147eec ui: 'show-what-to-build' reports grafts separately.
  af1f1c38fb status: Report grafting derivations specially.
  64fd1c01bc grafts: Record metadata as derivation properties.
  8856f409d1 derivations: Add properties.

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#33519] [PATCH 0/4] Reporting grafts in the user interface
  2018-11-27  8:05   ` Ricardo Wurmus
  2018-11-28  9:41     ` Ludovic Courtès
@ 2018-11-30 11:56     ` Clément Lassieur
  1 sibling, 0 replies; 10+ messages in thread
From: Clément Lassieur @ 2018-11-30 11:56 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 33519

Ricardo Wurmus <rekado@elephly.net> writes:

> Clément Lassieur <clement@lassieur.org> writes:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Hello Guix!
>>>
>>> These patches add UI hints so that grafting derivations can be
>>> distinguished from more expensive derivations, as suggested by
>>> Ricardo a while back.
>>
>> [...]
>>
>>> Overall this makes operations more transparent.  Advanced users
>>> will know what this means, and hopefully others will notice that
>>> grafting is a relatively fast operation and discover that it has to
>>> do with security updates.
>>>
>>> Thoughts?
>>
>> This is awesome!
>
> I agree!  This looks great.
>
>> And I imagine it will allow to distinguish packages
>> and tests in Cuirass :-)
>
> How would that work?

As a way to link Cuirass packages to tools like hpcguix-web.  It's not a
priority though.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-30 11:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 21:43 [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Ludovic Courtès
2018-11-26 21:47 ` [bug#33519] [PATCH 1/4] derivations: Add properties Ludovic Courtès
2018-11-26 21:47   ` [bug#33519] [PATCH 2/4] grafts: Record metadata as derivation properties Ludovic Courtès
2018-11-26 21:47   ` [bug#33519] [PATCH 3/4] status: Report grafting derivations specially Ludovic Courtès
2018-11-26 21:47   ` [bug#33519] [PATCH 4/4] ui: 'show-what-to-build' reports grafts separately Ludovic Courtès
2018-11-27  7:50 ` [bug#33519] [PATCH 0/4] Reporting grafts in the user interface Clément Lassieur
2018-11-27  8:05   ` Ricardo Wurmus
2018-11-28  9:41     ` Ludovic Courtès
2018-11-30 11:56     ` Clément Lassieur
2018-11-27  8:27   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.