--with-graft tries to download source files and build them

  • Open
  • quality assurance status badge
Details
2 participants
  • Mark H Weaver
  • pkill9
Owner
unassigned
Submitted by
pkill9
Severity
normal

Debbugs page

pkill9 wrote 6 years ago
(name . bug-guix)(address . bug-guix@gnu.org)
E1hyE53-0000Fu-Hv@rmmprod05.runbox
When running `guix build --dry-run --with-graft=mesa=mesa love`, Guix shows that it will try to download a bunch of source files for quite a few packages:

```
$ guix build --dry-run --with-graft=mesa=mesa love
The following derivations would be built:
/gnu/store/0lfws1b85h6lkv09pp7q0439pd41qirj-love-11.1.drv
/gnu/store/2spqmdn4s13r0z9d9hym25h4nfcl1r5g-sdl2-2.0.9.drv
/gnu/store/aknpb0pgslx9jaidgvh8wrzl7j6nl3nn-fcitx-4.2.9.6.drv
/gnu/store/8pk7gncsr1cfph8km8dhwk67q9d58c0k-libepoxy-1.5.3.drv
/gnu/store/w0wxk5f2a44hksrbvwqxn1d6sx96hdyw-gtk+-3.24.9.drv
/gnu/store/ydx7mg4bni0lfckw0r3x65icmfhr194k-xorg-server-1.20.5.drv
/gnu/store/xnc6a1fjwlwfjpg0lwai3aq51rw5qwrc-extra-cmake-modules-5.55.0.drv
/gnu/store/jp29lhdwhs3znbsbznxq9nd9zp5l8ds0-qtbase-5.11.3.drv
/gnu/store/sblg1v3yxf41b89aaj4r47zcyhxs3az4-ibus-1.5.20.drv
/gnu/store/a4ynsy7ras28jlgmrhfilkc0lnin21mw-libnotify-0.7.7.drv
/gnu/store/d8gvjnrl584wc5pavppa3m3yvm3jaxpk-dconf-0.32.0.drv
76.4 MB would be downloaded:
/gnu/store/4vl3vkvqv0hhr0rlzciq55l4j8c5lgdz-ibus-1.5.20.tar.gz
/gnu/store/jpxqw86l1gxkfrp66h5mc747xf881hjm-gettext-0.19.8.1
/gnu/store/9dgbqa3m412prwadpwg0ah7a3kv6fh9p-libnotify-0.7.7.tar.xz
/gnu/store/aaha1wfv58b83fwp0fqg8b5nlpkw1bva-libmng-2.0.3
/gnu/store/6qy0ni5msmg93a55wi5qmj96729c1fcf-vulkan-headers-1.1.112
/gnu/store/3a3j7rnd49fr6papzd2r2i8f96ayxi1v-qtbase-everywhere-src-5.11.3.tar.xz
/gnu/store/3n7yhbfl1gik3n64rmy1574djpc1w6m5-gperf-3.1
/gnu/store/wkfsm7mv8rjawdkzi8chf7qy8l5dppkm-xorg-server-1.20.5.tar.xz
/gnu/store/7w7fq1iy0jkap5np4q00cw4cllr0lkj5-libdmx-1.1.4
/gnu/store/cc39n3mx1nswgwx7p8mbx7apy4j1w8yy-xtrans-1.3.5
/gnu/store/l1nxv1asf958h9ww4iijypyk31mj3d3x-gtk+-3.24.9.tar.xz
/gnu/store/9rzjddyd621n26av5hb6zn55r372fhnv-libepoxy-1.5.3.tar.xz
```
Mark H Weaver wrote 6 years ago
(address . pkill9@runbox.com)(address . 37035@debbugs.gnu.org)
87zhkafd56.fsf@netris.org
Hi,

<pkill9@runbox.com> writes:

Toggle quote (31 lines)
> When running `guix build --dry-run --with-graft=mesa=mesa love`, Guix shows that it will try to download a bunch of source files for quite a few packages:
>
> ```
> $ guix build --dry-run --with-graft=mesa=mesa love
> The following derivations would be built:
> /gnu/store/0lfws1b85h6lkv09pp7q0439pd41qirj-love-11.1.drv
> /gnu/store/2spqmdn4s13r0z9d9hym25h4nfcl1r5g-sdl2-2.0.9.drv
> /gnu/store/aknpb0pgslx9jaidgvh8wrzl7j6nl3nn-fcitx-4.2.9.6.drv
> /gnu/store/8pk7gncsr1cfph8km8dhwk67q9d58c0k-libepoxy-1.5.3.drv
> /gnu/store/w0wxk5f2a44hksrbvwqxn1d6sx96hdyw-gtk+-3.24.9.drv
> /gnu/store/ydx7mg4bni0lfckw0r3x65icmfhr194k-xorg-server-1.20.5.drv
> /gnu/store/xnc6a1fjwlwfjpg0lwai3aq51rw5qwrc-extra-cmake-modules-5.55.0.drv
> /gnu/store/jp29lhdwhs3znbsbznxq9nd9zp5l8ds0-qtbase-5.11.3.drv
> /gnu/store/sblg1v3yxf41b89aaj4r47zcyhxs3az4-ibus-1.5.20.drv
> /gnu/store/a4ynsy7ras28jlgmrhfilkc0lnin21mw-libnotify-0.7.7.drv
> /gnu/store/d8gvjnrl584wc5pavppa3m3yvm3jaxpk-dconf-0.32.0.drv
> 76.4 MB would be downloaded:
> /gnu/store/4vl3vkvqv0hhr0rlzciq55l4j8c5lgdz-ibus-1.5.20.tar.gz
> /gnu/store/jpxqw86l1gxkfrp66h5mc747xf881hjm-gettext-0.19.8.1
> /gnu/store/9dgbqa3m412prwadpwg0ah7a3kv6fh9p-libnotify-0.7.7.tar.xz
> /gnu/store/aaha1wfv58b83fwp0fqg8b5nlpkw1bva-libmng-2.0.3
> /gnu/store/6qy0ni5msmg93a55wi5qmj96729c1fcf-vulkan-headers-1.1.112
> /gnu/store/3a3j7rnd49fr6papzd2r2i8f96ayxi1v-qtbase-everywhere-src-5.11.3.tar.xz
> /gnu/store/3n7yhbfl1gik3n64rmy1574djpc1w6m5-gperf-3.1
> /gnu/store/wkfsm7mv8rjawdkzi8chf7qy8l5dppkm-xorg-server-1.20.5.tar.xz
> /gnu/store/7w7fq1iy0jkap5np4q00cw4cllr0lkj5-libdmx-1.1.4
> /gnu/store/cc39n3mx1nswgwx7p8mbx7apy4j1w8yy-xtrans-1.3.5
> /gnu/store/l1nxv1asf958h9ww4iijypyk31mj3d3x-gtk+-3.24.9.tar.xz
> /gnu/store/9rzjddyd621n26av5hb6zn55r372fhnv-libepoxy-1.5.3.tar.xz
> ```

You asked Guix to build something, so it's not surprising to me that it
might need to download some source code to do that.

Can you spell out more clearly what you expected to happen differently,
and why you think Guix is acting improperly here?

Thanks,
Mark
pkill9 wrote 6 years ago
(name . Mark H Weaver)(address . mhw@netris.org)(name . 37035)(address . 37035@debbugs.gnu.org)
E1hzE9k-00070h-F3@rmmprod05.runbox
Hi,

Toggle quote (9 lines)
> You asked Guix to build something, so it's not surprising to me that it
> might need to download some source code to do that.
>
> Can you spell out more clearly what you expected to happen differently,
> and why you think Guix is acting improperly here?
>
> Thanks,
> Mark

Originally I expected it to attempt to graft mesa onto the love package, even though it's the exact same input, however after running `guix build --dry-run --with-graft=subversion=subversion git` I see that it shouldn't output anything (same as running `guix build` with a package you already have all substitutes for).

If I run `guix build --dry-run love` it shows that it will just download the substitute for "love", not build anything else from source, so grafting mesa onto it (even though it's the same input) shouldn't try to build anything from source.

Also just to note, in this example grafting "mesa" onto itself is just as an example, not for a useful reason. An example that doesn't try to build anything is running `guix build --dry-run --with-graft=subversion=subversion git`.

As an example of a graft that works, if you put this in a file and build it with `guix build -f <file>`, it will successfully graft the "hello" package (with the name and version changed) onto the "git" package:

```
(use-modules (guix packages) (gnu packages base) (gnu packages version-control))

(define new-subversion
(package (inherit hello)
(name "subversion")
(version (package-version subversion))))

(define new-subversion-graft
(package (inherit subversion)
(replacement new-subversion)))

(define with-new-subversion
(package-input-rewriting
`((,subversion . ,new-subversion-graft))))

(with-new-subversion git)
```

You can see that it worked by running `/gnu/store/...-git-2.22.0-svn/libexec/git-core/git-svn`, and it will fail with a bunch of errors, unlike the ungrafted package.
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 37035
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help