guix-devel
[Top][All Lists]
Advanced

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

Re: Ungrafted dependency


From: Leo Famulari
Subject: Re: Ungrafted dependency
Date: Fri, 21 Apr 2023 12:25:37 -0400

On Fri, Apr 21, 2023 at 11:11:07AM -0400, Greg Hogan wrote:
> mariadb is grafted on master. Why does libreoffice depend on the
> ungrafted mariadb rather than the grafted version? And, perhaps
> related, since libreoffice depends on mariadb's "dev" output, why does
> libreoffice pull in "out"? mariadb:dev was created specifically as a
> libreoffice dependency in the commits referenced by 2c9d3416.

Thanks for pointing this out.

TLDR: Libreoffice does not depend on the ungrafted mariadb. But there is
something weird going on.

First, to be clear, mariadb is not itself grafted on the master branch
as of commit 13ebf5e36cc676627a19072d3712c399b7aae61f (currently the
latest commit).

The package variable 'mariadb' in 'gnu/packages/databases.scm' does not
contain a '(replacement ...)' field. There are not any replacements in
the databases module at all.

However, the mariadb package is affected by other package grafts, as you
saw when building it with and without grafting enabled:

------
> $ guix build mariadb
> /gnu/store/3ygd7xks9glpnppjs3ir9q9py3cqr14f-mariadb-10.10.2-dev
> /gnu/store/0a1v0adgk43552hnjcy13pn4yj7rcimh-mariadb-10.10.2-lib
> /gnu/store/iyns06rxvm865a3fp7dclm2q2ff0nay8-mariadb-10.10.2
> 
> $ guix build --no-grafts mariadb
> /gnu/store/fjk994z0s3g429napn7cxgrdvqgbrj6p-mariadb-10.10.2-dev
> /gnu/store/08nbg7cm6fqkyxls5ap5p1ypr1s2f988-mariadb-10.10.2-lib
> /gnu/store/cdsdm8mqs13hp3pf013q1i4lka19g1sc-mariadb-10.10.2
------

Moving on to the specific case:

------
> $ guix size libreoffice
------

Now, I'm not totally sure, but I don't think that `guix size` is aware
of grafts, but I don't think it is, due to reasons:

https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/size.scm?id=13ebf5e36cc676627a19072d3712c399b7aae61f#n317

However, the correct way to inspect run-time dependencies of store items
on your system is `guix gc --references`, for example like this:

------
$ guix gc --references $(./pre-inst-env guix build libreoffice) | grep mariadb
/gnu/store/6xn39pwxa4rqjf43di84fyrvr90sfw54-mariadb-10.10.2-lib
/gnu/store/hdz68bigrndswi0kh2mn8rbf3lbfpxmp-mariadb-10.10.2-dev
$ guix gc --references $(./pre-inst-env guix build --no-grafts libreoffice) | 
grep mariadb
/gnu/store/08nbg7cm6fqkyxls5ap5p1ypr1s2f988-mariadb-10.10.2-lib
/gnu/store/fjk994z0s3g429napn7cxgrdvqgbrj6p-mariadb-10.10.2-dev
------

These 'references' are the actual strings in the store items that point
to other store items.

We see that, with grafts enabled, libreoffice does not refer to the
ungrafted mariadb.

Instead, it refers to some other mariadb, and I don't know where that
comes from. I wonder if libreoffice depending on `(,mariadb "dev")
accidentally creates a new derivation:

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/libreoffice.scm?id=13ebf5e36cc676627a19072d3712c399b7aae61f#n1120

If so, that's a bug. Any ideas?



reply via email to

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