--with-source=PACKAGE=REPLACEMENT-SOURCE doesn't work recursively

  • Done
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • Jesse Gibbons
  • Ludovic Courtès
  • Maxim Cournoyer
  • pkill9
Owner
unassigned
Submitted by
pkill9
Severity
normal
P
P
pkill9 wrote on 1 Jul 2020 18:53
(address . bug-guix@gnu.org)
20200701175331.551aa401@runbox.com
For example, `guix build --with-source=youtube-dl=blahblah mpv` builds
mpv normally, after giving a message: guix build: warning:
transformation 'with-source' had no effect on mpv@0.32.0
E
E
Efraim Flashner wrote on 2 Jul 2020 09:12
(name . pkill9)(address . pkill9@runbox.com)(address . 42155@debbugs.gnu.org)
20200702071206.GD6387@E5400
On Wed, Jul 01, 2020 at 05:53:31PM +0100, pkill9 wrote:
Toggle quote (5 lines)
> For example, `guix build --with-source=youtube-dl=blahblah mpv` builds
> mpv normally, after giving a message: guix build: warning:
> transformation 'with-source' had no effect on mpv@0.32.0
>

From 'guix build --help:'
--with-source=SOURCE
use SOURCE when building the corresponding package
--with-input=PACKAGE=REPLACEMENT
replace dependency PACKAGE by REPLACEMENT

I think what you're looking for is more of:

guix build --no-grafts mpv --with-input=youtube-dl=$(guix build --no-grafts youtube-dl --with-source=https://github.com/ytdl-org/youtube-dl/releases/download/2020.06.16/youtube-dl-2020.06.16.tar.gz)

This didn't work for me though, I got:
guix build: error: /gnu/store/9ncacjhzwlchpr1y5fd8ahdq59dsya20-youtube-dl-2020.06.16: unknown package

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl79iMMACgkQQarn3Mo9
g1F6sg/+JIfRbPo+7eZXrRQbKtanpu7UgmKp78lhX9K5t1RUICabpEU+yHumxQCo
m/i8cBXz6lGwX5VDzlkMB8JgJ8LKE7MNjTBW+ueSfCHfvYJvhaPtR5xUfy+o8vK7
YcmLtrDb4Y191fcnPOjESTAHc0FD5a2f/fWk5Ym+yhCIcTZiOBAumVgOXhrwcXi9
18jl5OSvUb0+iyjqXT1lVI+WPsLnTSNqVQ1XQiUZqRvP+CjPUx39pYU5VtNMSsT+
N//gHtSscAw9B0O178PofvQHFDXHb5vBY2MTJVrh+XlcsL6Ah9sf+UjD2PdQN4gH
L/4422Y2hfuUsk3iuE3aZZyEgVMzoj+W60uifYkSYE8RZ8TAkcMP39rlmnMvhl+c
W0+HPF/uCaJdRpdfDWMfSdf0I+uwbmmxP8n1U0G+p9VWF+VScMyxiZtA8o3cBlRf
Fm2RGdnO93tREpRhoyVmDh9huvr9n/Fglwsob2lxnn6PtO9IQ644z6cUyTnJq4lk
uTBiRl/P4m77o7Fwirb3Hf8B9WdCYDUGDjODffg9ysVvSayrlMEP4+oWFLL5lu2o
U7xi0M6y9WyunC9tG53y0NDWX/lQSkDi2Xkl01s0RnNdjZOjusaS99Aa6dGBsiMo
RdJs7CaaSD5LmFLuxMrTG1XXLPM8rRLydnNiuy3m55UI3kIeTSc=
=NmbF
-----END PGP SIGNATURE-----


P
P
pkill9 wrote on 2 Jul 2020 19:44
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 42155@debbugs.gnu.org)
20200702184407.01ba17d2@runbox.com
Toggle quote (11 lines)
> I think what you're looking for is more of:
>
> guix build --no-grafts mpv --with-input=youtube-dl=$(guix build
> --no-grafts youtube-dl
> --with-source=https://github.com/ytdl-org/youtube-dl/releases/download/2020.06.16/youtube-dl-2020.06.16.tar.gz)
>
> This didn't work for me though, I got:
> guix build: error:
> /gnu/store/9ncacjhzwlchpr1y5fd8ahdq59dsya20-youtube-dl-2020.06.16:
> unknown package

Even if that worked, it doesn't fix the issue of the --with-source flag
not working on the specified package's inputs.

That command doesn't work because you're giving it a store path, not a
package specification.
L
L
Ludovic Courtès wrote on 2 Jul 2020 23:59
(name . pkill9)(address . pkill9@runbox.com)
87imf5poie.fsf@gnu.org
pkill9 <pkill9@runbox.com> skribis:

Toggle quote (14 lines)
>> I think what you're looking for is more of:
>>
>> guix build --no-grafts mpv --with-input=youtube-dl=$(guix build
>> --no-grafts youtube-dl
>> --with-source=https://github.com/ytdl-org/youtube-dl/releases/download/2020.06.16/youtube-dl-2020.06.16.tar.gz)
>>
>> This didn't work for me though, I got:
>> guix build: error:
>> /gnu/store/9ncacjhzwlchpr1y5fd8ahdq59dsya20-youtube-dl-2020.06.16:
>> unknown package
>
> Even if that worked, it doesn't fix the issue of the --with-source flag
> not working on the specified package's inputs.

‘--with-source’ is documented to be “shallow”: unlike ‘--with-input’ &
co., it doesn’t apply recursively.

I think we should change it though.

Ludo’.
J
J
Jesse Gibbons wrote on 28 Aug 2020 00:10
re: --with-source=PACKAGE=REPLACEMENT-SOURCE doesn't work recursively
(address . 42155@debbugs.gnu.org)
ab53ddc4-826b-ea23-9379-121b2ec0c9e1@gmail.com

I want to be able to specify dependency sources, so I am working on this
issue. It's complicated because --with-source= can take a simple source
(implying the package being built should be built from SOURCE) or
package=source (AIUI implying PACKAGE in the specified list of packages
should be built from SOURCE).  Should we deprecate the current
interpretation of "--with-source=package=source"? Or would it be better
to preserve these options and make a new recursive
'--with-dependency-source=package=source' option?

I'm leaning towards making the option
"--with-dependency-source=package=source" because I think that will be
easier to accomplish and maintain. But if anyone has a compelling reason
to deprecate the old usage, I am willing to listen.
M
M
Maxim Cournoyer wrote on 21 Feb 2023 14:18
Re: bug#42155: --with-source=PACKAGE=REPLACEMENT-SOURCE doesn't work recursively
(name . Ludovic Courtès)(address . ludo@gnu.org)
87r0ujjgw9.fsf@gmail.com
Hi,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (21 lines)
> pkill9 <pkill9@runbox.com> skribis:
>
>>> I think what you're looking for is more of:
>>>
>>> guix build --no-grafts mpv --with-input=youtube-dl=$(guix build
>>> --no-grafts youtube-dl
>>> --with-source=https://github.com/ytdl-org/youtube-dl/releases/download/2020.06.16/youtube-dl-2020.06.16.tar.gz)
>>>
>>> This didn't work for me though, I got:
>>> guix build: error:
>>> /gnu/store/9ncacjhzwlchpr1y5fd8ahdq59dsya20-youtube-dl-2020.06.16:
>>> unknown package
>>
>> Even if that worked, it doesn't fix the issue of the --with-source flag
>> not working on the specified package's inputs.
>
> ‘--with-source’ is documented to be “shallow”: unlike ‘--with-input’ &
> co., it doesn’t apply recursively.
>
> I think we should change it though.

Closing, since that's been implemented per
28ade1bab207974cce6a014e7187968511fc5526 ("transformations:
'--with-source' now operates in depth.") last September.

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 42155
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