all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* lsof
@ 2013-03-03 10:38 Andreas Enge
  2013-03-03 21:14 ` lsof Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Enge @ 2013-03-03 10:38 UTC (permalink / raw)
  To: bug-guix

Hello,

the lsof tarball contains the source in a two-stage process: After 
unpacking, one is left with lsof_4.87_src.tar, which needs to be unpacked 
as well. I tried the following:

   (arguments
    `(#:phases
      (alist-replace
       'unpack
       (lambda* (#:key source name version #:allow-other-keys)
         (let ((unpack (assoc-ref %standard-phases 'unpack))
               (inner (string-append name "_" version "_src.tar")))
           (apply unpack (list #:source source))
           (apply unpack (list #:source inner))))
       %standard-phases)))

But apparently, NAME and VERSION are not passed through as function 
arguments (they are #f). Would it make sense to changes this? Or do you see 
a preferable way of doing the second stage unpacking?

Andreas

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

* Re: lsof
  2013-03-03 10:38 lsof Andreas Enge
@ 2013-03-03 21:14 ` Ludovic Courtès
  2013-03-04 21:55   ` lsof Andreas Enge
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2013-03-03 21:14 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hi!

Andreas Enge <andreas@enge.fr> skribis:

> the lsof tarball contains the source in a two-stage process: After 
> unpacking, one is left with lsof_4.87_src.tar, which needs to be unpacked 
> as well.

Weird.

> I tried the following:
>
>    (arguments
>     `(#:phases
>       (alist-replace
>        'unpack
>        (lambda* (#:key source name version #:allow-other-keys)
>          (let ((unpack (assoc-ref %standard-phases 'unpack))
>                (inner (string-append name "_" version "_src.tar")))
>            (apply unpack (list #:source source))
>            (apply unpack (list #:source inner))))
>        %standard-phases)))
>
> But apparently, NAME and VERSION are not passed through as function 
> arguments (they are #f). Would it make sense to changes this?

It wouldn’t hurt to pass them, and it may be helpful in cases like this.
So feel free to add it to build-system/gnu.scm and gnu-build-system.scm.

> Or do you see a preferable way of doing the second stage unpacking?

You could use (find-files "." "\\.tar$") to find the tar file, I guess.

Ludo’.

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

* Re: lsof
  2013-03-03 21:14 ` lsof Ludovic Courtès
@ 2013-03-04 21:55   ` Andreas Enge
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Enge @ 2013-03-04 21:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

Am Sonntag, 3. März 2013 schrieb Ludovic Courtès:
> Andreas Enge <andreas@enge.fr> skribis:
> > the lsof tarball contains the source in a two-stage process: After
> > unpacking, one is left with lsof_4.87_src.tar, which needs to be
> > unpacked as well.
> Weird.

I have seen it before, the tarball contains the source tarball and some 
additional metadata.

> > But apparently, NAME and VERSION are not passed through as function
> > arguments (they are #f). Would it make sense to changes this?
> It wouldn’t hurt to pass them, and it may be helpful in cases like this.
> So feel free to add it to build-system/gnu.scm and gnu-build-system.scm.

This looks complicated after all: One would probably need to repeat NAME 
and VERSION in the arguments section of a package; source seems to be 
passed automatically. And then there is the semantic difference between the 
name of a derivation and the name of a package...

> > Or do you see a preferable way of doing the second stage unpacking?
> You could use (find-files "." "\\.tar$") to find the tar file, I guess.

Thanks, I will rather go for this!

Andreas

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

end of thread, other threads:[~2013-03-04 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 10:38 lsof Andreas Enge
2013-03-03 21:14 ` lsof Ludovic Courtès
2013-03-04 21:55   ` lsof Andreas Enge

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.