unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* Error messages and progress report
@ 2012-12-09 20:01 Andreas Enge
  2012-12-09 20:50 ` Ludovic Courtès
  2013-01-06 17:49 ` Ludovic Courtès
  0 siblings, 2 replies; 26+ messages in thread
From: Andreas Enge @ 2012-12-09 20:01 UTC (permalink / raw)
  To: bug-guix

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

Hello,

advancing with my first steps in guix, I have lots of questions, probably 
naive ones.

$ guix-package -n -i hello

throws lots of error messages:

Backtrace:
In ice-9/boot-9.scm:
  63: 19 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 407: 18 [eval # #]
In unknown file:
   ?: 17 [call-with-input-string "(apply (module-ref (resolve-interface 
'(guix-package)) 'guix-package) (cdr (command-line)))" ...]
In ice-9/command-line.scm:
 174: 16 [#<procedure ccfac0 at ice-9/command-line.scm:169:3 (port)> 
#<input: string b78270>]
In unknown file:
   ?: 15 [eval (apply (module-ref # #) (cdr #)) #<directory (guile-user) 
db7d80>]
In ice-9/boot-9.scm:
 149: 14 [catch srfi-34 #<procedure 1146b20 at guix/ui.scm:61:2 ()> ...]
 157: 13 [#<procedure 12a4d20 ()>]
In /usr/local/bin/guix-package:
 438: 12 [#<procedure e37750 at /usr/local/bin/guix-package:430:4 ()>]
 323: 11 [process-actions (# # #)]
In srfi/srfi-1.scm:
 664: 10 [filter-map #<procedure 1141ae0 at /usr/local/bin/guix-
package:332:33 (expr)> ...]
In guix/packages.scm:
 295: 9 [package-derivation # # "x86_64-linux"]
In srfi/srfi-1.scm:
 578: 8 [map #<procedure expand-input (expr)> (("gawk" #))]
In guix/packages.scm:
 247: 7 [expand-input ("gawk" #)]
 295: 6 [package-derivation # # "x86_64-linux"]
In srfi/srfi-1.scm:
 578: 5 [map #<procedure expand-input (expr)> (# #)]
In guix/packages.scm:
 247: 4 [expand-input ("libsigsegv" #)]
 301: 3 [package-derivation # # "x86_64-linux"]
In guix/derivations.scm:
 606: 2 [build-expression->derivation # "libsigsegv-2.10.tar.gz" "x86_64-
linux" ...]
In guix/store.scm:
 408: 1 [add-text-to-store # "libsigsegv-2.10.tar.gz-guile-builder" ...]
In unknown file:
   ?: 0 [put-bytevector #<input-output: socket 5> #vu8(8 0 0 0 0 0 0 0) 
...]

ERROR: In procedure put-bytevector:
ERROR: In procedure fport_write: Bad file descriptor
the following derivations would be built:
    /nix/store/ry0il2rwcxl053y01ffddghl9s7mvkck-hello-2.8.drv
etc.


After that, things seem to proceed well for the moment;
$ guix-package -i hello
starts by downloading things and compiling them.
Concerning the downloads, would it be possible to easily add a progress
bar? In particular since the first download was gcc, quite some time passed
without any hint as to whether the program was still working.

Andreas





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

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

* Re: Error messages and progress report
  2012-12-09 20:01 Error messages and progress report Andreas Enge
@ 2012-12-09 20:50 ` Ludovic Courtès
  2012-12-10  9:19   ` Andreas Enge
  2013-01-06 17:49 ` Ludovic Courtès
  1 sibling, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-09 20:50 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hi,

Andreas Enge <andreas@enge.fr> skribis:

> $ guix-package -n -i hello

[...]

> In guix/store.scm:
>  408: 1 [add-text-to-store # "libsigsegv-2.10.tar.gz-guile-builder" ...]
> In unknown file:
>    ?: 0 [put-bytevector #<input-output: socket 5> #vu8(8 0 0 0 0 0 0 0) 
> ...]
>
> ERROR: In procedure put-bytevector:
> ERROR: In procedure fport_write: Bad file descriptor

Weird.  Here’s it’s trying to write to the socket corresponding to an
open connection to the daemon.  We’d need to look at the output of
‘strace’ to see what happened to this file descriptor.  Can you try
that, if that’s easily reproducible?

> After that, things seem to proceed well for the moment;
> $ guix-package -i hello
> starts by downloading things and compiling them.

Note that you can get pre-built binaries for x86_64-linux from
hydra.nixos.org:
<http://lists.gnu.org/archive/html/bug-guix/2012-11/msg00042.html>.

> Concerning the downloads, would it be possible to easily add a progress
> bar? In particular since the first download was gcc, quite some time passed
> without any hint as to whether the program was still working.

Yes, I agree this would be nice.  It can be achieved by tweaking
guix/build/download.scm and related code.

Thanks,
Ludo’.

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

* Re: Error messages and progress report
  2012-12-09 20:50 ` Ludovic Courtès
@ 2012-12-10  9:19   ` Andreas Enge
  2012-12-10 13:26     ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-10  9:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 566 bytes --]

Am Sonntag, 9. Dezember 2012 schrieb Ludovic Courtès:
> Note that you can get pre-built binaries for x86_64-linux from
> hydra.nixos.org:
> <http://lists.gnu.org/archive/html/bug-guix/2012-11/msg00042.html>.

This is a nice feature, thanks for the hint.

Nevertheless, since I got through building gcc, I would like to finish
the bootstrap process locally now. Unfortunately, it hangs (of all things!)
with guile-2.0.6 now, where "make check" fails. I am attaching the log 
file. There is a line
   FAIL: ftw.test: file-system-fold: EACCES

Andreas


[-- Attachment #1.2: Type: text/html, Size: 3107 bytes --]

[-- Attachment #2: check-guile.log.gz --]
[-- Type: application/x-gzip, Size: 188794 bytes --]

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

* Re: Error messages and progress report
  2012-12-10  9:19   ` Andreas Enge
@ 2012-12-10 13:26     ` Ludovic Courtès
  2012-12-10 18:17       ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-10 13:26 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

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

Hi Andreas,

Andreas Enge <andreas@enge.fr> skribis:

> Am Sonntag, 9. Dezember 2012 schrieb Ludovic Courtès:
>> Note that you can get pre-built binaries for x86_64-linux from
>> hydra.nixos.org:
>> <http://lists.gnu.org/archive/html/bug-guix/2012-11/msg00042.html>.
>
> This is a nice feature, thanks for the hint.
>
> Nevertheless, since I got through building gcc, I would like to finish
> the bootstrap process locally now. Unfortunately, it hangs (of all things!)
> with guile-2.0.6 now, where "make check" fails. I am attaching the log 
> file. There is a line
>    FAIL: ftw.test: file-system-fold: EACCES

So this is while building the final Guile.

Can you run:

  guix-build -e '(@ (distro packages base) guile-final)' --keep-failed

This will attempt to build the final Guile, and, upon failure, the build
tree will be kept under /tmp/nix-build-XXX.

Once it has failed, can you please apply this patch in the build tree:


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

diff --git a/test-suite/tests/ftw.test b/test-suite/tests/ftw.test
index 2a203de..052d985 100644
--- a/test-suite/tests/ftw.test
+++ b/test-suite/tests/ftw.test
@@ -224,7 +224,7 @@
             (skip   (lambda (n s r) (cons `(skip ,n) r)))
             (error  (lambda (n s e r) (cons `(error ,n ,e) r)))
             (name   (string-append %top-builddir "/test-EACCES")))
-        (equal? (file-system-fold enter? leaf down up skip error '() name)
+        (equal? (pk (file-system-fold enter? leaf down up skip error '() name))
                 `((error ,name ,EACCES))))))
 
   (pass-if "dangling symlink and lstat"

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


Then, from that build tree, type ‘source environment-variables’ (which
will setup the env. vars as they were during the build process), and
then ‘./check-guile ftw.test’.

This will print a line on stdout starting with “;;;”.  Please post that line.

What kernel are you using?  What file systems are involved?

Note that using pre-built binaries would allow to get past thing point,
because everything built fine on hydra.nixos.org.  But it’s a good idea
to investigate the failure, which may have something to do with the
Linux version or file system setup being used.

Thanks in advance,
Ludo’.

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

* Re: Error messages and progress report
  2012-12-10 13:26     ` Ludovic Courtès
@ 2012-12-10 18:17       ` Andreas Enge
  2012-12-10 21:29         ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-10 18:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Montag, 10. Dezember 2012 schrieb Ludovic Courtès:
> Can you run:
>   guix-build -e '(@ (distro packages base) guile-final)' --keep-failed

I already used
   ./pre-inst-env guix-build guile-2.0.6
so the build tree is there.

> Once it has failed, can you please apply this patch in the build tree:
> This will print a line on stdout starting with “;;;”.  Please post that 
line.

;;; (((up "/tmp/nix-build-dgk2vcwfmniiq2b5bk36whmq815abxva-
guile-2.0.6.drv-0/guile-2.0.6/test-EACCES") (leaf "/tmp/nix-build-
dgk2vcwfmniiq2b5bk36whmq815abxva-guile-2.0.6.drv-0/guile-2.0.6/test-
EACCES/a") (leaf "/tmp/nix-build-dgk2vcwfmniiq2b5bk36whmq815abxva-
guile-2.0.6.drv-0/guile-2.0.6/test-EACCES/b") (down "/tmp/nix-build-
dgk2vcwfmniiq2b5bk36whmq815abxva-guile-2.0.6.drv-0/guile-2.0.6/test-
EACCES")))

> What kernel are you using?  What file systems are involved?

   uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux

The file system is a simple ext3, on a luks encrypted partition
in an lvm. The /tmp/nix-build-dgk... directory is owned by root, since
the nix-worker was used for building. It has no special attributes.

Andreas

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

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

* Re: Error messages and progress report
  2012-12-10 18:17       ` Andreas Enge
@ 2012-12-10 21:29         ` Ludovic Courtès
  2012-12-10 22:12           ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-10 21:29 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hello,

Andreas Enge <andreas@enge.fr> skribis:

> ;;; (((up "/tmp/nix-build-dgk2vcwfmniiq2b5bk36whmq815abxva-
> guile-2.0.6.drv-0/guile-2.0.6/test-EACCES") (leaf "/tmp/nix-build-
> dgk2vcwfmniiq2b5bk36whmq815abxva-guile-2.0.6.drv-0/guile-2.0.6/test-
> EACCES/a") (leaf "/tmp/nix-build-dgk2vcwfmniiq2b5bk36whmq815abxva-
> guile-2.0.6.drv-0/guile-2.0.6/test-EACCES/b") (down "/tmp/nix-build-
> dgk2vcwfmniiq2b5bk36whmq815abxva-guile-2.0.6.drv-0/guile-2.0.6/test-
> EACCES")))

The test here creates the ‘test-EACCES’ directory, chmods it to 000, and
expects to be unable to list its contents.  But in your case, it succeeds.

I think that’s because nix-worker is running as root and doesn’t have
build users configured.  Could you setup build users and try again?
See <http://hydra.nixos.org/build/3456757/download/1/nix/manual.html#idp234224>
on how to do it.

Thanks for your help!

Ludo’.

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

* Re: Error messages and progress report
  2012-12-10 21:29         ` Ludovic Courtès
@ 2012-12-10 22:12           ` Andreas Enge
  2012-12-10 22:59             ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-10 22:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Montag, 10. Dezember 2012 schrieb Ludovic Courtès:
> The test here creates the ‘test-EACCES’ directory, chmods it to 000, and
> expects to be unable to list its contents.  But in your case, it
> succeeds.
> 
> I think that’s because nix-worker is running as root and doesn’t have
> build users configured.

Yes, I just tried creating a directory, chmod 000 and ls. root can do this.
However, when I chown the nix-build... directory to some other user, the
test succeeds. Should this problem not also occur when compiling
guile-2.0.6 by root outside of guix? Should the test maybe be disabled
in the guile distribution?

Andreas

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

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

* Re: Error messages and progress report
  2012-12-10 22:12           ` Andreas Enge
@ 2012-12-10 22:59             ` Ludovic Courtès
  2012-12-10 23:22               ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-10 22:59 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Yes, I just tried creating a directory, chmod 000 and ls. root can do this.
> However, when I chown the nix-build... directory to some other user, the
> test succeeds. Should this problem not also occur when compiling
> guile-2.0.6 by root outside of guix? Should the test maybe be disabled
> in the guile distribution?

Yes, that’s what I just did:

  http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=9977b316434c6ac59e0224fd530ab8065f2cc938

Thanks,
Ludo’.

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

* Re: Error messages and progress report
  2012-12-10 22:59             ` Ludovic Courtès
@ 2012-12-10 23:22               ` Andreas Enge
  2012-12-11 12:22                 ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-10 23:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Montag, 10. Dezember 2012 schrieb Ludovic Courtès:
> > Should this problem not also occur when
> > compiling guile-2.0.6 by root outside of guix? Should the test maybe
> > be disabled in the guile distribution?
> Yes, that’s what I just did:
> http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=9977
> b316434c6ac59e0224fd530ab8065f2cc938

Indeed, the test also failed when compiling guile-2.0.7 as root.

And using separate nix build users, "make check" succeeds for guile.
Thanks for your help!

Andreas

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

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

* Re: Error messages and progress report
  2012-12-10 23:22               ` Andreas Enge
@ 2012-12-11 12:22                 ` Andreas Enge
  2012-12-11 13:20                   ` Nikita Karetnikov
  2012-12-11 14:37                   ` Ludovic Courtès
  0 siblings, 2 replies; 26+ messages in thread
From: Andreas Enge @ 2012-12-11 12:22 UTC (permalink / raw)
  To: bug-guix

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

Hello,

I am getting there! Everything compiled, and there is now a hello package.
Or rather, lots of them. /nix/store contains
1 hello-2.8.tar.gz
3 hello-2.8.tar.gz.drv
3 hello-2.8.tar.gz-guile-builder
2 hello-2.8
2 hello-2.8.drv
2 hello-2.8-guile-builder
Altogether 13 files or directories, with different hashes prepended.
Unfortunately, all files have the date "Jan 1 1970". It would be nice to
use the real date of modification instead.


The command
   guix-package -i hello
still produces an error, probably related to making the symlinks
in my own environment:

Backtrace:
In ice-9/boot-9.scm:
 149: 12 [catch #t #<catch-closure 1e035c0> ...]
 157: 11 [#<procedure 1da10f0 ()>]
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-package)) 'guix-package) (cdr (command-line)))" ...]
In ice-9/command-line.scm:
 174: 6 [#<procedure 1e172c0 at ice-9/command-line.scm:169:3 (port)> 
#<input: string 1bd0340>]
In unknown file:
   ?: 5 [eval (apply (module-ref # #) (cdr #)) #<directory (guile-user) 
1e08d80>]
In ice-9/boot-9.scm:
 149: 4 [catch srfi-34 #<procedure 2365c40 at guix/ui.scm:61:2 ()> ...]
 157: 3 [#<procedure 2364d70 ()>]
In /usr/local/bin/guix-package:
 438: 2 [#<procedure 233d3f0 at /usr/local/bin/guix-package:430:4 ()>]
 379: 1 [process-actions (# #)]
In unknown file:
   ?: 0 [symlink "/nix/store/1n6bpxkjq2w1m8nlyc6c6bpf0y8rspi0-user-
environment" ...]

ERROR: In procedure symlink:
ERROR: In procedure symlink: No such file or directory


The directory
"/nix/store/1n6bpxkjq2w1m8nlyc6c6bpf0y8rspi0-user-environment"
exists, and its subdirectory "bin" contains a link "hello" to
/nix/store/g0izbi5fdmnpgc6mwi45sxks390fkm1v-hello-2.8/bin/hello.

So far, there is no ".guix-profile" in my home directory; but
creating it does not change the error message.

Do I need to do anything special? If yes, it would be good to add a
section "installation" to the manual. I suppose I also need to add a line
to my .bashrc to modify $PATH ?

Andreas

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

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

* Re: Error messages and progress report
  2012-12-11 12:22                 ` Andreas Enge
@ 2012-12-11 13:20                   ` Nikita Karetnikov
  2012-12-11 14:37                   ` Ludovic Courtès
  1 sibling, 0 replies; 26+ messages in thread
From: Nikita Karetnikov @ 2012-12-11 13:20 UTC (permalink / raw)
  To: bug-guix

> The command

> guix-package -i hello

> still produces an error, probably related to making the symlinks
> in my own environment:

[...]

> ERROR: In procedure symlink:
> ERROR: In procedure symlink: No such file or directory

'./pre-inst-env guix-package -i hello' returns the same backtrace on
my machine.

Nikita

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

* Re: Error messages and progress report
  2012-12-11 12:22                 ` Andreas Enge
  2012-12-11 13:20                   ` Nikita Karetnikov
@ 2012-12-11 14:37                   ` Ludovic Courtès
  2012-12-11 15:40                     ` Andreas Enge
  1 sibling, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-11 14:37 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hi,

Andreas Enge <andreas@enge.fr> skribis:

> The command
>    guix-package -i hello
> still produces an error, probably related to making the symlinks
> in my own environment:

Yes.  Currently ‘guix-package’ expects the default profile to be under
/nix/var/nix/profiles/guix, which typically doesn’t exist, hence the
failure.

Be warned that ‘guix-package’ is rough on the edges and needs love
before we can make a first alpha release.  I’ll look into it ASAP.

Anyway, what does work is something like:

  $ guix-package --profile=$HOME/.guix-profile --install=hello

> Do I need to do anything special?

No.

> If yes, it would be good to add a section "installation" to the
> manual. I suppose I also need to add a line to my .bashrc to modify
> $PATH ?

Yes.

Thanks!

Ludo’.

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

* Re: Error messages and progress report
  2012-12-11 14:37                   ` Ludovic Courtès
@ 2012-12-11 15:40                     ` Andreas Enge
  2012-12-11 21:15                       ` Andreas Enge
  2012-12-11 23:15                       ` Ludovic Courtès
  0 siblings, 2 replies; 26+ messages in thread
From: Andreas Enge @ 2012-12-11 15:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Dienstag, 11. Dezember 2012 schrieb Ludovic Courtès:
> Anyway, what does work is something like:
>   $ guix-package --profile=$HOME/.guix-profile --install=hello

This worked, but in a rather strange way. .guix-profile did not exist
yet. It was created as a symbolic link to the new file
.guix-profile-1-link, itself a symbolic link to
/nix/store/1n6bpxkjq2w1m8nlyc6c6bpf0y8rspi0-user-environment .

I deleted the redirection and let .guix-profile point to /nix/store/...
directly. Then adding a second package recreates the previous situation,
with .guix-profile-1-link pointing to a different user environment
in /nix/store. And after removing the second package, I get a
.guix-profile-2-link pointing to the previous user environment in
/nix/store. Interesting!

As for the rough edges, installing the hello package twice results in
an error message, too.

Another question: My guix source and compile directory gets populated
with symbolic links t-profile* to files /nix/store/*user-environment
that survive even to "make distclean". I suppose I can safely delete them?
If yes, could they be deleted by "make clean"?

Andreas

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

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

* Re: Error messages and progress report
  2012-12-11 15:40                     ` Andreas Enge
@ 2012-12-11 21:15                       ` Andreas Enge
  2012-12-11 23:16                         ` Ludovic Courtès
  2012-12-11 23:15                       ` Ludovic Courtès
  1 sibling, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-11 21:15 UTC (permalink / raw)
  To: bug-guix

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

Am Dienstag, 11. Dezember 2012 schrieb Andreas Enge:
> Am Dienstag, 11. Dezember 2012 schrieb Ludovic Courtès:
> > Anyway, what does work is something like:
> >   $ guix-package --profile=$HOME/.guix-profile --install=hello
> 
> This worked, but in a rather strange way.

Well, this is actually not strange, but documented in the manual,
I realise upon reading it again.

> Yes.  Currently ‘guix-package’ expects the default profile to be under
> /nix/var/nix/profiles/guix, which typically doesn’t exist, hence the
> failure.

However, the current behaviour is not consistent with the documentation.
"Instead of referring to these directories, users have their own
@dfn{profile}, which points to the packages that they actually want to
use.  That profile is normally stored in @code{$HOME/.guix-profile}, and
each user has its own profile."

"@item --profile=@var{profile}
@itemx -p @var{profile}
Use @var{profile} instead of the user's default profile."

This should be easy to fix.

Andreas

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

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

* Re: Error messages and progress report
  2012-12-11 15:40                     ` Andreas Enge
  2012-12-11 21:15                       ` Andreas Enge
@ 2012-12-11 23:15                       ` Ludovic Courtès
  2012-12-12  8:48                         ` Andreas Enge
  1 sibling, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-11 23:15 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Dienstag, 11. Dezember 2012 schrieb Ludovic Courtès:
>> Anyway, what does work is something like:
>>   $ guix-package --profile=$HOME/.guix-profile --install=hello
>
> This worked, but in a rather strange way. .guix-profile did not exist
> yet. It was created as a symbolic link to the new file
> .guix-profile-1-link, itself a symbolic link to
> /nix/store/1n6bpxkjq2w1m8nlyc6c6bpf0y8rspi0-user-environment .
>
> I deleted the redirection and let .guix-profile point to /nix/store/...
> directly. Then adding a second package recreates the previous situation,
> with .guix-profile-1-link pointing to a different user environment
> in /nix/store. And after removing the second package, I get a
> .guix-profile-2-link pointing to the previous user environment in
> /nix/store. Interesting!

This is expected.  As with nix-env, there’d normally be a
~/.guix-profile pointing to
/nix/var/nix/profiles/per-user/$USER/profile, which would itself point
to profile-X-link in the same directory (where X is the generation
number.)  So what you’re observing is basically this.

> As for the rough edges, installing the hello package twice results in
> an error message, too.

Commit 1c67d63 fixes that.

> Another question: My guix source and compile directory gets populated
> with symbolic links t-profile* to files /nix/store/*user-environment
> that survive even to "make distclean". I suppose I can safely delete them?
> If yes, could they be deleted by "make clean"?

Yes.  These were leftovers from tests/guix-package.sh.  I think 7a6548c
solves that.

Thanks!

Ludo’.

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

* Re: Error messages and progress report
  2012-12-11 21:15                       ` Andreas Enge
@ 2012-12-11 23:16                         ` Ludovic Courtès
  2012-12-12  8:55                           ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-11 23:16 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> However, the current behaviour is not consistent with the documentation.

It’s more that the documentation is ahead of time.  :-)

Ludo’.

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

* Re: Error messages and progress report
  2012-12-11 23:15                       ` Ludovic Courtès
@ 2012-12-12  8:48                         ` Andreas Enge
  2012-12-12 13:14                           ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-12  8:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Mittwoch, 12. Dezember 2012 schrieb Ludovic Courtès:
> > As for the rough edges, installing the hello package twice results in
> > an error message, too.
> Commit 1c67d63 fixes that.

Thanks! Now I can install "hello" over and over again :-)

> > Another question: My guix source and compile directory gets populated
> > with symbolic links t-profile* to files /nix/store/*user-environment
> > that survive even to "make distclean". I suppose I can safely delete
> > them? If yes, could they be deleted by "make clean"?
> Yes.  These were leftovers from tests/guix-package.sh.  I think 7a6548c
> solves that.

Yes, it seems to. Thank!

Andreas

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

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

* Re: Error messages and progress report
  2012-12-11 23:16                         ` Ludovic Courtès
@ 2012-12-12  8:55                           ` Andreas Enge
  2012-12-13 19:17                             ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2012-12-12  8:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 306 bytes --]

Am Mittwoch, 12. Dezember 2012 schrieb Ludovic Courtès:
> Andreas Enge <andreas@enge.fr> skribis:
> > However, the current behaviour is not consistent with the
> > documentation.
> It’s more that the documentation is ahead of time.  :-)

I think the attached patch solves the problem.

Andreas

[-- Attachment #1.2: Type: text/html, Size: 2115 bytes --]

[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 415 bytes --]

diff --git a/guix-package.in b/guix-package.in
index 7bc32f8..bb1b8c0 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -68,7 +68,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
                      "default")))
 
 (define %current-profile
-  (string-append %profile-directory "/profile"))
+  %user-environment-directory)
 
 (define (profile-manifest profile)
   "Return the PROFILE's manifest."

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

* Re: Error messages and progress report
  2012-12-12  8:48                         ` Andreas Enge
@ 2012-12-12 13:14                           ` Ludovic Courtès
  0 siblings, 0 replies; 26+ messages in thread
From: Ludovic Courtès @ 2012-12-12 13:14 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Mittwoch, 12. Dezember 2012 schrieb Ludovic Courtès:
>> > As for the rough edges, installing the hello package twice results in
>> > an error message, too.
>> Commit 1c67d63 fixes that.
>
> Thanks! Now I can install "hello" over and over again :-)

Excellent!  I think this is a salient feature that we should promote.
:-)

Thanks,
Ludo’.

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

* Re: Error messages and progress report
  2012-12-12  8:55                           ` Andreas Enge
@ 2012-12-13 19:17                             ` Andreas Enge
  0 siblings, 0 replies; 26+ messages in thread
From: Andreas Enge @ 2012-12-13 19:17 UTC (permalink / raw)
  To: bug-guix


[-- Attachment #1.1: Type: text/plain, Size: 559 bytes --]

Am Mittwoch, 12. Dezember 2012 schrieb Andreas Enge:
> Am Mittwoch, 12. Dezember 2012 schrieb Ludovic Courtès:
> > Andreas Enge <andreas@enge.fr> skribis:
> > > However, the current behaviour is not consistent with the
> > > documentation.
> > It’s more that the documentation is ahead of time.  :-)
> I think the attached patch solves the problem.

Here the same patch in "git format-patch" format.

Alternatively, one may add to the documentation that a directory
   /nix/var/nix/profiles/guix/per-user/$USER
should be created.

Andreas


[-- Attachment #1.2: Type: text/html, Size: 3411 bytes --]

[-- Attachment #2: 0003-guix-package.in-store-user-profile-in-HOME-.guix-pro.patch --]
[-- Type: text/x-patch, Size: 820 bytes --]

From a8e69abc371c6e8d3c22a35f7281df2a39335cbd Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Thu, 13 Dec 2012 20:14:50 +0100
Subject: [PATCH 3/3] guix-package.in: store user profile in
 $HOME/.guix-profile instead of   
 /nix/var/nix/profiles/guix/per-user/$USER

---
 guix-package.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix-package.in b/guix-package.in
index 7bc32f8..bb1b8c0 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -68,7 +68,7 @@ exec ${GUILE-@GUILE@} -L "@guilemoduledir@" -l "$0"    \
                      "default")))
 
 (define %current-profile
-  (string-append %profile-directory "/profile"))
+  %user-environment-directory)
 
 (define (profile-manifest profile)
   "Return the PROFILE's manifest."
-- 
1.7.10.4


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

* Re: Error messages and progress report
  2012-12-09 20:01 Error messages and progress report Andreas Enge
  2012-12-09 20:50 ` Ludovic Courtès
@ 2013-01-06 17:49 ` Ludovic Courtès
  2013-01-10  9:56   ` Andreas Enge
  1 sibling, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2013-01-06 17:49 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Hi,

Andreas Enge <andreas@enge.fr> skribis:

> Concerning the downloads, would it be possible to easily add a progress
> bar? In particular since the first download was gcc, quite some time passed
> without any hint as to whether the program was still working.

I just pushed a progress report thingie in ‘core-updates’ (it’s not a
progress bar, just a percentage, but I find it pleasant enough. ;-)).

Thanks!

Ludo’.

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

* Re: Error messages and progress report
  2013-01-06 17:49 ` Ludovic Courtès
@ 2013-01-10  9:56   ` Andreas Enge
  2013-01-10 10:45     ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2013-01-10  9:56 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Sonntag, 6. Januar 2013 schrieb Ludovic Courtès:
> I just pushed a progress report thingie in ‘core-updates’ (it’s not a
> progress bar, just a percentage, but I find it pleasant enough. ;-)).

It works like a charm, thanks!

Andreas

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

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

* Re: Error messages and progress report
  2013-01-10  9:56   ` Andreas Enge
@ 2013-01-10 10:45     ` Andreas Enge
  2013-01-10 21:14       ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2013-01-10 10:45 UTC (permalink / raw)
  To: bug-guix; +Cc: Ludovic Courtès

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

Am Donnerstag, 10. Januar 2013 schrieb Andreas Enge:
> Am Sonntag, 6. Januar 2013 schrieb Ludovic Courtès:
> > I just pushed a progress report thingie in ‘core-updates’ (it’s not a
> > progress bar, just a percentage, but I find it pleasant enough. ;-)).
> It works like a charm, thanks!

Well, it could be slightly improved. I am just downloading
http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-
libre-3.3.8-gnu.tar.xz,
and the file name is so long that the progress counter does not fit into 
the same line any more. I would suggest to print only the file name after 
the last "/".

Andreas

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

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

* Re: Error messages and progress report
  2013-01-10 10:45     ` Andreas Enge
@ 2013-01-10 21:14       ` Ludovic Courtès
  2013-01-11 13:49         ` Andreas Enge
  0 siblings, 1 reply; 26+ messages in thread
From: Ludovic Courtès @ 2013-01-10 21:14 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Well, it could be slightly improved. I am just downloading
> http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-3.3.8-gnu.tar.xz,
> and the file name is so long that the progress counter does not fit into 
> the same line any more. I would suggest to print only the file name after 
> the last "/".

I find it useful to have the server name printed (esp. in the case of
mirror://, ftpmirror.gnu.org, etc.), so I’ve come up with a solution
that abbreviates long URIs like this:

--8<---------------cut here---------------start------------->8---
scheme@(guix build download)> (uri-abbreviation (string->uri "http://www.gnu.org/gnu/guile/guile-2.0.7.tar.gz"))
$15 = "http://www.gnu.org/.../guile-2.0.7.tar.gz"
scheme@(guix build download)> (uri-abbreviation (string->uri "http://www.gnu.org/gnu/ed/ed-5.0.tar.gz"))
$16 = "http://www.gnu.org/gnu/ed/ed-5.0.tar.gz"
scheme@(guix build download)> (uri-abbreviation (string->uri "http://linux-libre.fsfla.org/pub/linux-libre/releases/3.3.8-gnu/linux-libre-3.3.8-gnu.tar.xz"))
$17 = "http://linux-libre.fsfla.org/.../linux-libre-3.3.8-gnu.tar.xz"
--8<---------------cut here---------------end--------------->8---

WDYT?

I’ll commit it if there are no objections.

Ludo’.

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

* Re: Error messages and progress report
  2013-01-10 21:14       ` Ludovic Courtès
@ 2013-01-11 13:49         ` Andreas Enge
  2013-01-11 14:58           ` Ludovic Courtès
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Enge @ 2013-01-11 13:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

Am Donnerstag, 10. Januar 2013 schrieb Ludovic Courtès:
> I find it useful to have the server name printed (esp. in the case of
> mirror://, ftpmirror.gnu.org, etc.), so I’ve come up with a solution
> that abbreviates long URIs like this:
> I’ll commit it if there are no objections.

This looks good to me.

I came across another problem: During parallel builds (the norm nowadays), 
several lines of downloading get mixed, or even the progress numbers are 
mixed with lines of output from the compiler etc.. I do not see what to do 
about it (except for clearing out a complete line, so there is no output 
trailing after the percentage), and the progress indicator can still be 
used to indicate problems when nothing progresses.

Andreas




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

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

* Re: Error messages and progress report
  2013-01-11 13:49         ` Andreas Enge
@ 2013-01-11 14:58           ` Ludovic Courtès
  0 siblings, 0 replies; 26+ messages in thread
From: Ludovic Courtès @ 2013-01-11 14:58 UTC (permalink / raw)
  To: Andreas Enge; +Cc: bug-guix

Andreas Enge <andreas@enge.fr> skribis:

> Am Donnerstag, 10. Januar 2013 schrieb Ludovic Courtès:
>> I find it useful to have the server name printed (esp. in the case of
>> mirror://, ftpmirror.gnu.org, etc.), so I’ve come up with a solution
>> that abbreviates long URIs like this:
>> I’ll commit it if there are no objections.
>
> This looks good to me.

Great.  Pushed as 28e55604212c01884a77a4f5eb66294c4957c48a.

> I came across another problem: During parallel builds (the norm nowadays), 
> several lines of downloading get mixed, or even the progress numbers are 
> mixed with lines of output from the compiler etc..

Yes.  Unfortunately, the daemon just sends us the build outputs all
mixed up, and there’s no way on the client side to filter that or
anything.

> I do not see what to do about it (except for clearing out a complete
> line, so there is no output trailing after the percentage), and the
> progress indicator can still be used to indicate problems when nothing
> progresses.

I’m not sure how to clear out a complete line.  I don’t want to embed
ncurses just for that.  ;-)

Thanks,
Ludo’.

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

end of thread, other threads:[~2013-01-11 14:58 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-09 20:01 Error messages and progress report Andreas Enge
2012-12-09 20:50 ` Ludovic Courtès
2012-12-10  9:19   ` Andreas Enge
2012-12-10 13:26     ` Ludovic Courtès
2012-12-10 18:17       ` Andreas Enge
2012-12-10 21:29         ` Ludovic Courtès
2012-12-10 22:12           ` Andreas Enge
2012-12-10 22:59             ` Ludovic Courtès
2012-12-10 23:22               ` Andreas Enge
2012-12-11 12:22                 ` Andreas Enge
2012-12-11 13:20                   ` Nikita Karetnikov
2012-12-11 14:37                   ` Ludovic Courtès
2012-12-11 15:40                     ` Andreas Enge
2012-12-11 21:15                       ` Andreas Enge
2012-12-11 23:16                         ` Ludovic Courtès
2012-12-12  8:55                           ` Andreas Enge
2012-12-13 19:17                             ` Andreas Enge
2012-12-11 23:15                       ` Ludovic Courtès
2012-12-12  8:48                         ` Andreas Enge
2012-12-12 13:14                           ` Ludovic Courtès
2013-01-06 17:49 ` Ludovic Courtès
2013-01-10  9:56   ` Andreas Enge
2013-01-10 10:45     ` Andreas Enge
2013-01-10 21:14       ` Ludovic Courtès
2013-01-11 13:49         ` Andreas Enge
2013-01-11 14:58           ` 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).