unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Rewriting inputs and ’arguments’ after patch #43578
       [not found] <20200923161253.2378-1-ludo@gnu.org>
@ 2020-09-28 19:39 ` zimoun
  2020-10-05 13:46   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2020-09-28 19:39 UTC (permalink / raw)
  To: guix-devel

Dear,

Let consider the package ’emacs-magit’.  It does not depend on
’emacs-minimal’ but instead the argument is replaced by ’emacs-no-x’,
see: 

--8<---------------cut here---------------start------------->8---
      (build-system emacs-build-system)
      (arguments
       `(#:emacs ,emacs-no-x            ;module support is required
         #:tests? #t
--8<---------------cut here---------------end--------------->8---

which is for example confirmed by “guix graph –path”:

--8<---------------cut here---------------start------------->8---
$ guix graph --path emacs-magit emacs-minimal
guix graph: error: no path from 'emacs-magit@2.90.1-6.7f486d4' to 'emacs-minimal@27.1'

$ guix graph --path emacs-magit emacs-no-x
emacs-magit@2.90.1-6.7f486d4
emacs-libgit@20200515-1.0ef8b13
emacs-no-x@27.1
--8<---------------cut here---------------end--------------->8---


Therefore, it is not possible to rewrite this “inputs“ (using the patch
[1]), as the dry-run shows:

--8<---------------cut here---------------start------------->8---
$ guix build emacs-magit --with-input=emacs-no-x=emacs-next -n
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations would be built:
   /gnu/store/c7g5f6xgljj63n69dilvxmkgsdarflj2-emacs-magit-2.90.1-6.7f486d4.drv
   /gnu/store/aanmy6ma51yc3ivfmzp8iakirmg2hclb-emacs-libgit-20200515-1.0ef8b13.drv
43.2 MB would be downloaded:
   /gnu/store/bvhvqv99ylyam8gv77ipa9qrgr6659ly-emacs-no-x-27.1
   /gnu/store/j5vhj85bn6adkmlnfc6w7rikss6753d3-emacs-libgit-20200515-1.0ef8b13.tar.xz
   /gnu/store/0w02d2pxhjwfa6674fwq5asv6w7xdkrp-jsoncpp-1.9.2
   /gnu/store/nlia3wcilwsdj8q883bgjmzirs6yl8z7-rhash-1.3.9
   /gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5
   /gnu/store/mhlxiw0fgv5mbqsml433f34349xdlmn3-module-import-compiled
   /gnu/store/gk7gh5ik9f4ng35k22pz49r75vkhcbk8-emacs-magit-2.90.1-6.7f486d4-checkout
--8<---------------cut here---------------end--------------->8---


And it is expected because ’package-mapping’ only “rewrites” the
’inputs:

--8<---------------cut here---------------start------------->8---
              (inputs (map rewrite (package-inputs p)))
              (native-inputs (map rewrite (package-native-inputs p)))
              (propagated-inputs (map rewrite (package-propagated-inputs p)))
              (replacement (and=> (package-replacement p) replace))
--8<---------------cut here---------------end--------------->8---


Do I miss something?


All the best,
simon

[1] <http://issues.guix.gnu.org/issue/43578>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rewriting inputs and ’arguments’ after patch #43578
  2020-09-28 19:39 ` Rewriting inputs and ’arguments’ after patch #43578 zimoun
@ 2020-10-05 13:46   ` Ludovic Courtès
  2020-10-05 14:17     ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2020-10-05 13:46 UTC (permalink / raw)
  To: zimoun; +Cc: guix-devel

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> Let consider the package ’emacs-magit’.  It does not depend on
> ’emacs-minimal’ but instead the argument is replaced by ’emacs-no-x’,
> see: 
>
>       (build-system emacs-build-system)
>       (arguments
>        `(#:emacs ,emacs-no-x            ;module support is required
>          #:tests? #t
>
>
> which is for example confirmed by “guix graph –path”:
>
> $ guix graph --path emacs-magit emacs-minimal
> guix graph: error: no path from 'emacs-magit@2.90.1-6.7f486d4' to 'emacs-minimal@27.1'
>
> $ guix graph --path emacs-magit emacs-no-x
> emacs-magit@2.90.1-6.7f486d4
> emacs-libgit@20200515-1.0ef8b13
> emacs-no-x@27.1
>
>
>
> Therefore, it is not possible to rewrite this “inputs“ (using the patch
> [1]), as the dry-run shows:
>
> $ guix build emacs-magit --with-input=emacs-no-x=emacs-next -n

AFAICS, it’s working as expected:

--8<---------------cut here---------------start------------->8---
$ guix gc --references $(guix build emacs-magit --with-input=emacs-no-x=emacs-next -d --no-grafts) |grep emacs-next
/gnu/store/8ffjg2961x30171i24pl7j9wafcbli2b-emacs-next-28.0.50.1-0.2ea3466.drv
$ guix gc --references $(guix build emacs-magit --with-input=emacs-no-x=emacs-next -d --no-grafts) |grep emacs-no-x
--8<---------------cut here---------------end--------------->8---

Now, there dependencies in the graph that depend on ‘emacs-minimal’
instead of ‘emacs-no-x’, so you’d probably also need to replace those.

HTH,
Ludo’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rewriting inputs and ’arguments’ after patch #43578
  2020-10-05 13:46   ` Ludovic Courtès
@ 2020-10-05 14:17     ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2020-10-05 14:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix Devel

Hi Ludo,

On Mon, 5 Oct 2020 at 15:46, Ludovic Courtès <ludo@gnu.org> wrote:

> > Therefore, it is not possible to rewrite this “inputs“ (using the patch
> > [1]), as the dry-run shows:
> >
> > $ guix build emacs-magit --with-input=emacs-no-x=emacs-next -n
>
> AFAICS, it’s working as expected:
>
> --8<---------------cut here---------------start------------->8---
> $ guix gc --references $(guix build emacs-magit --with-input=emacs-no-x=emacs-next -d --no-grafts) |grep emacs-next
> /gnu/store/8ffjg2961x30171i24pl7j9wafcbli2b-emacs-next-28.0.50.1-0.2ea3466.drv
> $ guix gc --references $(guix build emacs-magit --with-input=emacs-no-x=emacs-next -d --no-grafts) |grep emacs-no-x
> --8<---------------cut here---------------end--------------->8---

Hum?  I believe what I see... I am sure about my previous example and
your example also speaks by itself...  Therefore, the most probable
seems to be a mistake between my keyboard and my chair. :-)
Sorry for the noise.

> Now, there dependencies in the graph that depend on ‘emacs-minimal’
> instead of ‘emacs-no-x’, so you’d probably also need to replace those.

Yep!  That's the point of 'package-with-emacs-next'.

Cheers,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-05 14:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200923161253.2378-1-ludo@gnu.org>
2020-09-28 19:39 ` Rewriting inputs and ’arguments’ after patch #43578 zimoun
2020-10-05 13:46   ` Ludovic Courtès
2020-10-05 14:17     ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).