unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* libjpeg-8 not installable
@ 2013-01-19 11:16 Andreas Enge
  2013-01-19 21:30 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2013-01-19 11:16 UTC (permalink / raw)
  To: bug-guix

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

Hello,

libjpeg-8 is listed by "guix-package --list-available", and built without 
problem by "guix-build libjpeg-8". However:

$ guix-package -i libjpeg-8
libjpeg-8: package not found

Could this be related to the definition with inheritance?
(define-public libjpeg-8
  (package (inherit libjpeg)
   (name "libjpeg-8")
...
Or is it a bug in guix-package?

Andreas

[-- Attachment #2: Type: text/html, Size: 3049 bytes --]

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

* Re: libjpeg-8 not installable
  2013-01-19 11:16 libjpeg-8 not installable Andreas Enge
@ 2013-01-19 21:30 ` Ludovic Courtès
  2013-01-20 11:58   ` Andreas Enge
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2013-01-19 21:30 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hi!

Andreas Enge <andreas@enge.fr> skribis:

> libjpeg-8 is listed by "guix-package --list-available", and built without 
> problem by "guix-build libjpeg-8". However:
>
> $ guix-package -i libjpeg-8
> libjpeg-8: package not found

(Note that you could do: guix-package -i `guix-build libjpeg-8`.)

> Could this be related to the definition with inheritance?
> (define-public libjpeg-8
>   (package (inherit libjpeg)
>    (name "libjpeg-8")
> ...

This has to do with how guix-package interprets package names.

As noted in the manual, users can write either “guix-package -i guile”
or “guix-package -i guile-2.0.7”.  In the latter case, guix-package
assumes that “2.0.7” is a version number, and then searches all packages
whose name is “guile” and whose version is “2.0.7”.

In your case, it searches for packages named “libjpeg” and whose version
number is “8”–which fails.

The fix it to not introduce the version number in the ‘name’ field, and
instead leave it in the ‘version’ field.

HTH,
Ludo’.

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

* Re: libjpeg-8 not installable
  2013-01-19 21:30 ` Ludovic Courtès
@ 2013-01-20 11:58   ` Andreas Enge
  2013-01-22 21:40     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2013-01-20 11:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Samstag, 19. Januar 2013 schrieb Ludovic Courtès:
> This has to do with how guix-package interprets package names.
> 
> As noted in the manual, users can write either “guix-package -i guile”
> or “guix-package -i guile-2.0.7”.  In the latter case, guix-package
> assumes that “2.0.7” is a version number, and then searches all packages
> whose name is “guile” and whose version is “2.0.7”.
> 
> In your case, it searches for packages named “libjpeg” and whose version
> number is “8”–which fails.
> 
> The fix it to not introduce the version number in the ‘name’ field, and
> instead leave it in the ‘version’ field.

Thanks for the explanation. I was confusing scheme variable names and 
package names, which are the same most of the time. With
(define-public libjpeg-8
  (package (inherit libjpeg)
   (name "libjpeg")
   (version "8d")

$ guix-package -i libjpeg-8d
indeed works as expected.

However, now
$ guix-build libjpeg-8d
returns
libjpeg-8d: unknown package
Using the scheme variable name does not help:
$ guix-build libjpeg-8
libjpeg-8: unknown package

Could the behaviour of guix-build be made the same as that of guix-package?

Andreas

[-- Attachment #2: Type: text/html, Size: 6633 bytes --]

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

* Re: libjpeg-8 not installable
  2013-01-20 11:58   ` Andreas Enge
@ 2013-01-22 21:40     ` Ludovic Courtès
  2013-01-23 20:28       ` Andreas Enge
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2013-01-22 21:40 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> However, now
> $ guix-build libjpeg-8d
> returns
> libjpeg-8d: unknown package
> Using the scheme variable name does not help:
> $ guix-build libjpeg-8
> libjpeg-8: unknown package
>
> Could the behaviour of guix-build be made the same as that of guix-package?

Commit 5401dd7 does that.

There’s one difference compared to guix-package: guix-build doesn’t try
to parse “sub-derivation names” like guix-package does (after a
colon–see the manual), because that doesn’t make sense here since
guix-build builds all the outputs of a derivation.

BTW, you could have used:

  guix-build -e '(@ (gnu packages libjpeg) libjpeg-8)'

Less convenient, but more efficient.

Thanks!

Ludo’.

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

* Re: libjpeg-8 not installable
  2013-01-22 21:40     ` Ludovic Courtès
@ 2013-01-23 20:28       ` Andreas Enge
  2013-01-23 23:13         ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Enge @ 2013-01-23 20:28 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Dienstag, 22. Januar 2013 schrieb Ludovic Courtès:
> Commit 5401dd7 does that.

It almost works now, thanks! I can do

$ guix-build libjpeg-8d
and
$ guix-build libjpeg-9
but
$ guix-build libjpeg
fails:

Backtrace:
In ice-9/boot-9.scm:
 149: 12 [catch #t #<catch-closure 1e3e9c0> ...]
 157: 11 [#<procedure 1dda0f0 ()>]
In unknown file:
   ?: 10 [catch-closure]
In ice-9/boot-9.scm:
  63: 9 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 407: 8 [eval # #]
In unknown file:
   ?: 7 [call-with-input-string "(apply (module-ref (resolve-interface 
'(guix-build)) 'guix-build) (cdr (command-line)))" ...]
In ice-9/command-line.scm:
 174: 6 [#<procedure 1d592e0 at ice-9/command-line.scm:169:3 (port)> 
#<input: string 1c02410>]
In unknown file:
   ?: 5 [eval (apply (module-ref # #) (cdr #)) #<directory (guile-user) 
1e40d80>]
In ice-9/boot-9.scm:
 149: 4 [catch srfi-34 #<procedure 22ce560 at guix/ui.scm:71:2 ()> ...]
 157: 3 [#<procedure 22d2f00 ()>]
In /usr/local/bin/guix-build:
 231: 2 [#<procedure 22c9420 at /usr/local/bin/guix-build:228:2 ()>]
In srfi/srfi-1.scm:
 664: 1 [filter-map #<procedure 22c9120 at /usr/local/bin/guix-build:233:33 
(expr)> ...]
In /usr/local/bin/guix-build:
 210: 0 [#<procedure 22c9120 at /usr/local/bin/guix-build:233:33 (expr)> #]

/usr/local/bin/guix-build:210:17: In procedure #<procedure 22c9120 at 
/usr/local/bin/guix-build:233:33 (expr)>:
/usr/local/bin/guix-build:210:17: Wrong type to apply: (#<package 
libjpeg-8d gnu/packages/libjpeg.scm:27 20fd0b0>)


Concerning guix-package,
$ guix-package -i libjpeg
installs version 8d, not the newer 9.

Even by exchanging the order of the variables, the older one gets 
installed. It looks to me as if the first found in alphabetical order is 
taken, while it should rather be the last one (not in alphabetical order, 
but lexicographically on the version number).

Andreas

[-- Attachment #2: Type: text/html, Size: 9500 bytes --]

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

* Re: libjpeg-8 not installable
  2013-01-23 20:28       ` Andreas Enge
@ 2013-01-23 23:13         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2013-01-23 23:13 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> $ guix-build libjpeg
> fails:
>
> Backtrace:
> In ice-9/boot-9.scm:
>  149: 12 [catch #t #<catch-closure 1e3e9c0> ...]
>  157: 11 [#<procedure 1dda0f0 ()>]
> In unknown file:
>    ?: 10 [catch-closure]
> In ice-9/boot-9.scm:
>   63: 9 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  407: 8 [eval # #]
> In unknown file:
>    ?: 7 [call-with-input-string "(apply (module-ref (resolve-interface 
> '(guix-build)) 'guix-build) (cdr (command-line)))" ...]
> In ice-9/command-line.scm:
>  174: 6 [#<procedure 1d592e0 at ice-9/command-line.scm:169:3 (port)> 
> #<input: string 1c02410>]
> In unknown file:
>    ?: 5 [eval (apply (module-ref # #) (cdr #)) #<directory (guile-user) 
> 1e40d80>]
> In ice-9/boot-9.scm:
>  149: 4 [catch srfi-34 #<procedure 22ce560 at guix/ui.scm:71:2 ()> ...]
>  157: 3 [#<procedure 22d2f00 ()>]
> In /usr/local/bin/guix-build:
>  231: 2 [#<procedure 22c9420 at /usr/local/bin/guix-build:228:2 ()>]
> In srfi/srfi-1.scm:
>  664: 1 [filter-map #<procedure 22c9120 at /usr/local/bin/guix-build:233:33 
> (expr)> ...]
> In /usr/local/bin/guix-build:
>  210: 0 [#<procedure 22c9120 at /usr/local/bin/guix-build:233:33 (expr)> #]
>
> /usr/local/bin/guix-build:210:17: In procedure #<procedure 22c9120 at 
> /usr/local/bin/guix-build:233:33 (expr)>:
> /usr/local/bin/guix-build:210:17: Wrong type to apply: (#<package 
> libjpeg-8d gnu/packages/libjpeg.scm:27 20fd0b0>)

This is fixed by commit 9c9da07.

Thanks for testing!

Ludo’.

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

end of thread, other threads:[~2013-01-23 23:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-19 11:16 libjpeg-8 not installable Andreas Enge
2013-01-19 21:30 ` Ludovic Courtès
2013-01-20 11:58   ` Andreas Enge
2013-01-22 21:40     ` Ludovic Courtès
2013-01-23 20:28       ` Andreas Enge
2013-01-23 23:13         ` 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).