all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Greg Hogan <code@greghogan.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Ungrafted dependency
Date: Fri, 21 Apr 2023 12:25:37 -0400	[thread overview]
Message-ID: <ZEK5Acz/yWC0tKau@jasmine.lan> (raw)
In-Reply-To: <CA+3U0Z=YYnE0PD9NK4XNZjuqSRzwD5xAvQ6t0yhgHxHjGgCe3w@mail.gmail.com>

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	other threads:[~2023-04-21 17:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 15:11 Ungrafted dependency Greg Hogan
2023-04-21 16:25 ` Leo Famulari [this message]
2023-05-03 20:53   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEK5Acz/yWC0tKau@jasmine.lan \
    --to=leo@famulari.name \
    --cc=code@greghogan.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.