unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: <pkill9@runbox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 37035 <37035@debbugs.gnu.org>
Subject: bug#37035: --with-graft tries to download source files and build them
Date: Sun, 18 Aug 2019 06:55:08 +0100 (BST)	[thread overview]
Message-ID: <E1hzE9k-00070h-F3@rmmprod05.runbox> (raw)
In-Reply-To: <87zhkafd56.fsf@netris.org>

Hi,

> 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.

      reply	other threads:[~2019-08-18  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 11:38 bug#37035: --with-graft tries to download source files and build them pkill9
2019-08-15 19:20 ` Mark H Weaver
2019-08-18  5:55   ` pkill9 [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=E1hzE9k-00070h-F3@rmmprod05.runbox \
    --to=pkill9@runbox.com \
    --cc=37035@debbugs.gnu.org \
    --cc=mhw@netris.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 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).