packages from store paths don't propagate propagated-inputs

  • Open
  • quality assurance status badge
Details
2 participants
  • MSavoritias
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
MSavoritias
Severity
normal
M
M
MSavoritias wrote on 2 Oct 16:46 +0200
(address . bug-guix@gnu.org)
7bac67d3-fcf4-4c76-af94-00998892f9dc@msavoritias.me
With a package definition adding a propagated input.

Using guix build to build a package like so:

guix build --rounds=3 --no-substitutes --no-grafts --keep-failed
--load-path=. <the package>


and then taking the store path at the end for example:

phase `compress-documentation' succeeded after 0.0 seconds
successfully built /gnu/store/vcj7bq0igj2354m5pqk9zf1x0cnwgjzd-po4a-0.73.drv
/gnu/store/j37fygmv7p69nmw0md916acinc8c8m4y-po4a-0.73


and installing it in the profile with

guix package --install /gnu/store/j37fygmv7p69nmw0md916acinc8c8m4y-po4a-0.73


will not install the propagated input into the profile. It will only
have po4a installed.

$ guix package --install
/gnu/store/j37fygmv7p69nmw0md916acinc8c8m4y-po4a-0.73
The following package will be installed:
   po4a 0.73

The following derivation will be built:
  /gnu/store/mc57jjaqlrmp0dw8sy2vlcv3c5giblk9-profile.drv

building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 1 package...
$ guix package --list-installed
po4a    0.73    out /gnu/store/j37fygmv7p69nmw0md916acinc8c8m4y-po4a-0.73
$


;; This file was automatically generated and is for internal use only.
;; It cannot be passed to the '--manifest' option.
;; Run 'guix package --export-manifest' if you want to export a file
;; suitable for '--manifest'.

(manifest
  (version 4)
  (packages
    (("po4a"
      "0.73"
      "out"
      "/gnu/store/j37fygmv7p69nmw0md916acinc8c8m4y-po4a-0.73"))))
T
T
Tobias Geerinckx-Rice wrote on 2 Oct 20:22 +0200
Re: bug#73599: packages from store pa ths don't propagate propagated-inputs
(address . ludo@gnu.org)
9A3DB9A4-F18A-4B66-AA0A-C1E1177667D5@tobias.gr
Hi [explicitly CC'ing Ludo', I hope that's OK],

I don't think

guix install $(guix build foo)

is, or is expected to be, a supported way to install packages? Packages have more metadata attached to them than store items. I don't think that propagation is recorded in the Nix database. Nor do I think it should be just to support this hack.

The manual doesn't explicitly say that it's semi-supported, which could be improved, but I think it's quietly understood...

It happens to work most of the time, it can be nice to have (I install most firefox versions this way), we won't deliberately break the way it happens to work, but it's not a synonym of

guix install foo

Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
M
M
MSavoritias wrote on 3 Oct 09:39 +0200
Re: bug#73599: packages from store paths don't propagate propagated-inputs
(address . ludo@gnu.org)
2214f032-e5d5-4592-b05a-c7134cfcba62@msavoritias.me
Tobias Geerinckx-Rice kirjoitti 2.10.2024 klo 21.22:
Toggle quote (8 lines)
> Hi [explicitly CC'ing Ludo', I hope that's OK],
>
> I don't think
>
> guix install $(guix build foo)
>
> is, or is expected to be, a supported way to install packages? Packages have more metadata attached to them than store items. I don't think that propagation is recorded in the Nix database. Nor do I think it should be just to support this hack.

It actually is mentioned explicitly in the manual.

from the link above:

Alternatively, a package can directly specify a store file name such as
/gnu/store/...-guile-3.0.7, as produced by, e.g., |guix build|.

Sometimes packages have /propagated inputs/: these are dependencies that
automatically get installed along with the required package (see
|propagated-inputs| in |package| objects
for information about propagated inputs in package definitions).


There was an investigation yesterday at the xmpp room and that is how we
discovered that the documentation has a bug. If we do not want to
support it then this is just a documentation bug.

Personally i could go either way. I already updated the project
documentation I have to reflect not to do this

MSavoritias
Attachment: file
M
M
MSavoritias wrote on 3 Oct 10:07 +0200
(address . ludo@gnu.org)
eec68dbc-a058-4979-83b7-968164220867@msavoritias.me
MSavoritias kirjoitti 3.10.2024 klo 10.39:
Toggle quote (37 lines)
>
>
> Tobias Geerinckx-Rice kirjoitti 2.10.2024 klo 21.22:
>> Hi [explicitly CC'ing Ludo', I hope that's OK],
>>
>> I don't think
>>
>> guix install $(guix build foo)
>>
>> is, or is expected to be, a supported way to install packages? Packages have more metadata attached to them than store items. I don't think that propagation is recorded in the Nix database. Nor do I think it should be just to support this hack.
>
> It actually is mentioned explicitly in the manual.
> https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-package.html
>
> from the link above:
>
> Alternatively, a package can directly specify a store file name such
> as /gnu/store/...-guile-3.0.7, as produced by, e.g., |guix build|.
>
> Sometimes packages have /propagated inputs/: these are dependencies
> that automatically get installed along with the required package (see
> |propagated-inputs| in |package| objects
> <https://guix.gnu.org/manual/devel/en/html_node/package-Reference.html#package_002dpropagated_002dinputs>,
> for information about propagated inputs in package definitions).
>
>
> There was an investigation yesterday at the xmpp room and that is how
> we discovered that the documentation has a bug. If we do not want to
> support it then this is just a documentation bug.
>
> Personally i could go either way. I already updated the project
> documentation I have to reflect not to do this
> https://codeberg.org/Guix_Bechamel/collective/wiki/Updating-Packages#testing-the-package-at-runtime
>
> MSavoritias
>

Sorry for the second reply just wanted to add some additional things here.

> Packages have more metadata attached to them than store items.

I was very surprised to discover this yesterday when somebody pointed it
out. The manual does not mention this in the store section. Is this
because what you want is a nar that is retrieved only when doing guix
export/import? at least that is my guess doing a search for metadata in
the guix manual.

Aside from that as a separate issue of concern

it was mentioned that the Gnu Guix channel has solved this by doing the
whole pre-inst-env architecture thing but i found little documentation
to go on in the manual aside from "keeping things separate". There is
also no mention of why it is needed, why these tools where picked, how
the architecture is arranged and interacts or what each tool actually
does. I tried to read the source files but there is not enough comments
to go on. I assume it is expected to know pathing, unix, autotools, bash
scripting among others but that is not mentioned and shouldn't be needed
imo.

Some clarifications of this would be nice but as I said these are out of
scope of this bug report probably.

Also some guide on the Guix manual by hopefully more knowledgeable
people on how you are supposed to test packages at runtime would be
nice. The guide only mentions to build packages but that doesn't make
sure that packages actually work. namely:

- po4a in the gnu channel of guix is atm broken. It misses gettext at
runtime.

- gajim doesn't show emojis

MSavoritias
Attachment: file
T
T
Tobias Geerinckx-Rice wrote on 3 Oct 11:29 +0200
Re: bug#73599: packages from store pa ths don't propagate propagated-inputs
(address . ludo@gnu.org)
84D6620E-38AC-4F18-93F1-0F8AEC7D8D4C@tobias.gr
Heyo,

On 3 October 2024 07:39:27 UTC, MSavoritias <email@msavoritias.me> wrote:
Toggle quote (5 lines)
>Tobias Geerinckx-Rice kirjoitti 2.10.2024 klo 21.22:
>> is, or is expected to be, a supported way to install packages? Packages have more metadata attached to them than store items. I don't think that propagation is recorded in the Nix database. Nor do I think it should be just to support this hack.
>
>It actually is mentioned explicitly in the manual. https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-package.html

I think I was misunderstood. That is the part that needs improvement. It may not 'explicitly' say that propagation will work in both cases, but the flow strongly implies it.

What I'm not aware of is any documentation that 'installing a store item' is not the same as 'installing a package'. It's a lossy transformation.

See also:

$ guix package -I sbcl-typo
$ guix install sbcl-typo &>/dev/null
$ guix package -I sbcl-typo
sbcl-typo 0.0.0-0.0e88349 out /gnu/store/67nkzm5mw4ma39na24l9rv98gkfh3nbg-sbcl-typo-0.0.0-0.0e88349
$ guix package -r sbcl-typo -i $(guix build sbcl-typo) &>/dev/null
$ guix package -I sbcl-typo
sbcl-typo-0.0.0 0.0e88349 out /gnu/store/67nkzm5mw4ma39na24l9rv98gkfh3nbg-sbcl-typo-0.0.0-0.0e88349
$ guix package -r sbcl-typo
guix package: error: package 'sbcl-typo' not found in profile


Store items just aren't packages.

Toggle quote (2 lines)
>Personally i could go either way.

I don't think you can, not *without* extending the database schema or otherwise adding the missing metadata back to the store item though, e.g., a hidden Scheme file, i.e., overkill. I'd love to be proven wrong.

Otherwise, the documentation-bug way is the only realistic way.



Kind regards,

T G-R

Sent on the go. Excuse or enjoy my brevity.
M
M
MSavoritias wrote on 3 Oct 11:34 +0200
Re: bug#73599: packages from store paths don't propagate propagated-inputs
(address . ludo@gnu.org)
e7a1a7d4-b07d-4e53-afca-e3e37eb644ba@msavoritias.me
Tobias Geerinckx-Rice kirjoitti 3.10.2024 klo 12.29:

Toggle quote (1 lines)
> I think I was misunderstood. That is the part that needs improvement. It may not 'explicitly' say that propagation will work in both cases, but the flow strongly implies it.
Agreed.
Toggle quote (4 lines)
>> Personally i could go either way.
> I don't think you can, not *without* extending the database schema or otherwise adding the missing metadata back to the store item though, e.g., a hidden Scheme file, i.e., overkill. I'd love to be proven wrong.
>
> Otherwise, the documentation-bug way is the only realistic way.
Documentation bug sounds good to me. It would also ideally be handled
the same with the Documentation bugs i sent in the other email. I didn't
see it reflected back to me so adding it here. Maybe email lists are
having problems.


> Packages have more metadata attached to them than store items.

I was very surprised to discover this yesterday when somebody pointed it
out. The manual does not mention this in the store section. Is this
because what you want is a nar that is retrieved only when doing guix
export/import? at least that is my guess doing a search for metadata in
the guix manual.

Aside from that as a separate issue of concern

it was mentioned that the Gnu Guix channel has solved this by doing the
whole pre-inst-env architecture thing but i found little documentation
to go on in the manual aside from "keeping things separate". There is
also no mention of why it is needed, why these tools where picked, how
the architecture is arranged and interacts or what each tool actually
does. I tried to read the source files but there is not enough comments
to go on. I assume it is expected to know pathing, unix, autotools, bash
scripting among others but that is not mentioned and shouldn't be needed
imo.

Some clarifications of this would be nice but as I said these are out of
scope of this bug report probably.

Also some guide on the Guix manual by hopefully more knowledgeable
people on how you are supposed to test packages at runtime would be
nice. The guide only mentions to build packages but that doesn't make
sure that packages actually work. namely:

- po4a in the gnu channel of guix is atm broken. It misses gettext at
runtime.

- gajim doesn't show emojis

MSavoritias
Attachment: file
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73599@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73599
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch