unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: Problem with patching tar
Date: Tue, 05 May 2015 18:13:12 +0200	[thread overview]
Message-ID: <87mw1j3svb.fsf@gnu.org> (raw)
In-Reply-To: <CAFtzXzOfeADbM9OHM7A0JrCG6c8AoCwnNGYXUnRvGwfY1BSXSg@mail.gmail.com> (Manolis Ragkousis's message of "Tue, 5 May 2015 09:52:50 +0300")

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Manolis Ragkousis <manolis837@gmail.com> skribis:

> When I try to patch tar I get "(vm-run "VM: Stack overflow" ())",
> probably, because it tries to use patch but it does not yet exist and
> I get the chicken-egg problem.

Indeed.  The problem was that, by default, source patching in
‘patch-and-repack’ would use not the tar from ‘%final-inputs’, but the
tar built with ‘%final-inputs’.  Hence the circular dependency: to apply
the patch of this tar, we would first need to built it.

So you first need this patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1204 bytes --]

--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -315,8 +315,11 @@ representation."
   (string-append (package-name package) "-" (package-version package)))
 
 (define (%standard-patch-inputs)
-  (let ((ref (lambda (module var)
-               (module-ref (resolve-interface module) var))))
+  (let* ((canonical (module-ref (resolve-interface '(gnu packages base))
+                                'canonical-package))
+         (ref       (lambda (module var)
+                      (canonical
+                       (module-ref (resolve-interface module) var)))))
     `(("tar"   ,(ref '(gnu packages base) 'tar))
       ("xz"    ,(ref '(gnu packages compression) 'xz))
       ("bzip2" ,(ref '(gnu packages compression) 'bzip2))
@@ -324,8 +327,7 @@ representation."
       ("lzip"  ,(ref '(gnu packages compression) 'lzip))
       ("unzip" ,(ref '(gnu packages zip) 'unzip))
       ("patch" ,(ref '(gnu packages base) 'patch))
-      ("locales" ,(ref '(gnu packages commencement)
-                       'glibc-utf8-locales-final)))))
+      ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales)))))
 
 (define (default-guile)
   "Return the default Guile package used to run the build code of

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]


I just pushed it to wip-hurd.

Make sure to remind us to apply it in the next core-updates cycle.

Thanks!

Ludo’.

      reply	other threads:[~2015-05-05 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05  6:52 Problem with patching tar Manolis Ragkousis
2015-05-05 16:13 ` Ludovic Courtès [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=87mw1j3svb.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=Guix-devel@gnu.org \
    --cc=manolis837@gmail.com \
    /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).