mbox

[bug#33519,0/4] Reporting grafts in the user interface

Message ID 20181126214306.27587-1-ludo@gnu.org
Headers show

Message

Ludovic Courtès Nov. 26, 2018, 9:43 p.m. UTC
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(-)