unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with (patches)
@ 2014-04-11 23:50 Manolis Ragkousis
  2014-04-12  8:45 ` Manolis Ragkousis
  2014-04-12  9:57 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-11 23:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

In this part of my code
>         (source (origin
>              (method git-fetch)
>              (uri (git-reference
>                    (url "git://git.savannah.gnu.org/hurd/hurd")
>                    (commit "e77f00db5097d741f27c74c03d194a233f648615")))
>              (sha256
>               (base32
>                "010q5wy88gaw4qfv2vl9pxfma9px8gs6v03ahqksq420v003b6r1"))
>              (patches (list (search-patch "minimal-hurd.patch")))))

as long as I have (patches..) in there I get the error here

http://paste.lisp.org/display/142007/raw

>  In unknown file: ?: 0 [string-length #f]
>  ERROR: In procedure string-length: Wrong type argument in position 1 (expecting string): #f

I have added the patch to the gnu-system.am file under patches

>  gnu/packages/patches/mit-krb5-init-fix.patch            \
>  gnu/packages/patches/minimal-hurd.patch            \  <-- this one
>  gnu/packages/patches/mpc123-initialize-ao.patch        \

It should have found it. My whole recipe is here
http://paste.lisp.org/display/142006/raw

I never had this problem in other files, only in hurd.scm file.

Manolis

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

* Re: Problem with (patches)
  2014-04-11 23:50 Problem with (patches) Manolis Ragkousis
@ 2014-04-12  8:45 ` Manolis Ragkousis
  2014-04-12  9:57 ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-12  8:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

If I change from (method git-fetch) to (method url-fetch) in
(source..) it seems I can't reproduce the error and it finds patches
properly.

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

* Re: Problem with (patches)
  2014-04-11 23:50 Problem with (patches) Manolis Ragkousis
  2014-04-12  8:45 ` Manolis Ragkousis
@ 2014-04-12  9:57 ` Ludovic Courtès
  2014-04-12 12:08   ` Manolis Ragkousis
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-12  9:57 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

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

Manolis Ragkousis <manolis837@gmail.com> skribis:

> In this part of my code
>>         (source (origin
>>              (method git-fetch)
>>              (uri (git-reference
>>                    (url "git://git.savannah.gnu.org/hurd/hurd")
>>                    (commit "e77f00db5097d741f27c74c03d194a233f648615")))
>>              (sha256
>>               (base32
>>                "010q5wy88gaw4qfv2vl9pxfma9px8gs6v03ahqksq420v003b6r1"))
>>              (patches (list (search-patch "minimal-hurd.patch")))))
>
> as long as I have (patches..) in there I get the error here
>
> http://paste.lisp.org/display/142007/raw

(Please always put things inline.)

--8<---------------cut here---------------start------------->8---
 549: 5 [expand-input # # # ...]
 512: 4 [cache # "x86_64-linux" #<procedure thunk ()>]
 602: 3 [thunk]
 320: 2 [patch-and-repack # # # ...]
In ice-9/boot-9.scm:
 357: 1 [string-every #<charset {#\0..#\9 #\A..#\F #\a..#\f}> #f 0 #<undefined>]
In unknown file:
   ?: 0 [string-length #f]
--8<---------------cut here---------------end--------------->8---

I believe this is fixed with:


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

diff --git a/guix/packages.scm b/guix/packages.scm
index 812d6bb..fa93cee 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -317,7 +317,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
 
   (define (numeric-extension? file-name)
     ;; Return true if FILE-NAME ends with digits.
-    (string-every char-set:hex-digit (file-extension file-name)))
+    (and=> (file-extension file-name)
+           (string-every char-set:hex-digit <>)))
 
   (define (tarxz-name file-name)
     ;; Return a '.tar.xz' file name based on FILE-NAME.

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


Can you confirm?

In addition, you may want to add a ‘file-name’ field, so that the
checkout has a name more descriptive than ‘git-checkout’, as is done for
libwebsockets:

  (package
    (name "libwebsockets")
    (version "1.2")
    (source (origin
              ;; The project does not publish tarballs, so we have to take
              ;; things from Git.
              (method git-fetch)
              (uri (git-reference
                    (url "git://git.libwebsockets.org/libwebsockets")
                    (commit (string-append "v" version
                                           "-chrome26-firefox18"))))
              (sha256
               (base32
                "1293hbz8qj4p27m1qjf8dn97r10xjyiwdpq491m87zi025s558cl"))
              (file-name (string-append name "-" version))))  ;; <--- here

HTH!

Ludo’.

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

* Re: Problem with (patches)
  2014-04-12  9:57 ` Ludovic Courtès
@ 2014-04-12 12:08   ` Manolis Ragkousis
  2014-04-12 12:40     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-12 12:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

>               (file-name (string-append name "-" version))))  ;; <--- here

This fixed it.

Thank you
Manolis

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

* Re: Problem with (patches)
  2014-04-12 12:08   ` Manolis Ragkousis
@ 2014-04-12 12:40     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-12 12:40 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

>>               (file-name (string-append name "-" version))))  ;; <--- here
>
> This fixed it.

Pushed, thanks!

Ludo’.

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

end of thread, other threads:[~2014-04-12 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11 23:50 Problem with (patches) Manolis Ragkousis
2014-04-12  8:45 ` Manolis Ragkousis
2014-04-12  9:57 ` Ludovic Courtès
2014-04-12 12:08   ` Manolis Ragkousis
2014-04-12 12:40     ` Ludovic Courtès

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