Subject: bug#23132: closed (Re: bug#23132: Grafted system retains references to original store items)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 20 May 2016 23:38:02 +0000

Your bug report

#23132: Grafted system retains references to original store items

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

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
23132: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23132
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#23132: Grafted system retains references to original store items
From: [email-masked] (Ludovic Courtès)
To: Mark H Weaver <[email-masked]>
Cc: [email-masked]
Date: Sat, 21 May 2016 01:36:50 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

[email-masked] (Ludovic Courtès) skribis:

> Mark H Weaver <[email-masked]> skribis:
>
>> [email-masked] (Ludovic Courtès) writes:
>
> [...]
>
>>> What does “guix build glib” produce?  Is the “bin” output of “glib”
>>> correctly grafted?
>>
>> It produces:
>>
>> /gnu/store/1my476c628x9kxa6pf2jlw8mhdlvr8xr-glib-2.46.1
>> /gnu/store/yw2yjlc1mgb4ga6m28nazxwjfh1d2p1n-glib-2.46.1-bin
>> /gnu/store/mm05frzzxa55kl062c4qp44qli00jnm4-glib-2.46.1-doc
>
> The problem we have (also with currentish master) is that the grafted
> glib refers to the non-grafted one:
>
> $ ./pre-inst-env guix build glib --no-grafts
> /gnu/store/nnbd3mbb7cyzj3f9hmm84jwmhslx8jd1-glib-2.48.0-bin
> /gnu/store/ijpqwljxn2j9nimjqnds58m2dzlcxf1g-glib-2.48.0-doc
> /gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1hmsg-glib-2.48.0
> $ ./pre-inst-env guix build glib
> /gnu/store/40s3d59ig936fnqivyps3fwjzgm6m864-glib-2.48.0-bin
> /gnu/store/fc5pcy9cj4r8plf7sxhykz3k7z03p22y-glib-2.48.0-doc
> /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0
> $ guix gc --references /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0|grep glib-
> /gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1hmsg-glib-2.48.0
> /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0
>
> It took me a while to find out where that reference came from.  Since
> ‘grep -r’ returned nothing, I resorted to ‘guix archive --export’
> searched for “6m4xdh1rj3np9w2fikf8wlq6lka1hmsg” in the result, and
> found:
>
> $ find /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0 -name \*gdb.py
> /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0/share/gdb/auto-load/gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1hmsg-glib-2.48.0/lib/libgobject-2.0.so.0.4800.0-gdb.py
> /gnu/store/vvdqmpm5biq2x3pw4s142qpcla2ryvax-glib-2.48.0/share/gdb/auto-load/gnu/store/6m4xdh1rj3np9w2fikf8wlq6lka1hmsg-glib-2.48.0/lib/libglib-2.0.so.0.4800.0-gdb.py
>
> So we need an extra pass in (guix build grafts) to rename files whose
> name appears in the mapping.

Fixed in ece6864bd04fc2f9ff86fd4ac9cb0712dd71c094.

Ludo’.

Subject: Grafted system retains references to original store items
From: Mark H Weaver <[email-masked]>
To: [email-masked]
Date: Sun, 27 Mar 2016 23:39:42 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

While testing my preliminary work on grafting improvements, I discovered
that my current system is retaining references to the original flawed
openssl-1.0.2f.  One path of references goes like this:

   /gnu/store/pnbljdp1hpsvnbgqfl8bws7lpj7pm8cb-system
-> /gnu/store/bzdhckvz4sms136fw64pvyhajawdb8ri-profile
-> /gnu/store/dhrgkq1zfkkc5rnz51qlshakapsa2sgm-gnome-session-3.18.1.2
-> /gnu/store/55pqh3wl085d4h033n41b7x0fg9djd1k-glib-2.46.1-bin
-> /gnu/store/kkn66257xrrjhyhq332bndhjpz4d9x76-python-wrapper-3.4.3
-> /gnu/store/qrg3jza3p5281p255cx0lsqk8snbb6pq-python-3.4.3
-> /gnu/store/dgyc74zakg110dxj67z3mj9g1vk8l4xp-openssl-1.0.2f

The gnome-session store item above was created by a grafting derivation,
and all of the ones that follow (starting with glib-2.46.1-bin) are
ungrafted derivations.  The grafting derivation for gnome-session failed
to include a mapping for glib-2.46.1-bin.

  mhw@jojen:~$ guix build --log-file /gnu/store/dgyc74zakg110dxj67z3mj9g1vk8l4xp-openssl-1.0.2f
  https://hydra.gnu.org/log/dgyc74zakg110dxj67z3mj9g1vk8l4xp-openssl-1.0.2f

Here's the .drv file for the gnome-session store item above:

  mhw@jojen:~$ guix build --log-file /gnu/store/dhrgkq1zfkkc5rnz51qlshakapsa2sgm-gnome-session-3.18.1.2
  /var/log/guix/drvs/b9/n4f67h7fi7l3g5brws2bxlpfx9qvgb-gnome-session-3.18.1.2.drv.bz2
  mhw@jojen:~$ bzcat /var/log/guix/drvs/b9/n4f67h7fi7l3g5brws2bxlpfx9qvgb-gnome-session-3.18.1.2.drv.bz2
  grafting '/gnu/store/2f25m1jyy7lvkjqgilza6bafbnv3k044-gnome-session-3.18.1.2' -> '/gnu/store/dhrgkq1zfkkc5rnz51qlshakapsa2sgm-gnome-session-3.18.1.2'...
  mhw@jojen:~$ cat /gnu/store/b9n4f67h7fi7l3g5brws2bxlpfx9qvgb-gnome-session-3.18.1.2.drv

      Mark