unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* info dir clashes
@ 2015-03-27 19:52 Federico Beffa
  2015-03-28 14:37 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Beffa @ 2015-03-27 19:52 UTC (permalink / raw)
  To: Guix-devel

Hi,

given that the file .../share/info/dir creates clashes in user
profiles and that it is anyway handled with the help of info-dir
substitutes, shouldn't we systematically delete them with the help,
e.g., of a phase in gnu-build-system?

Regards,
Fede

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

* Re: info dir clashes
  2015-03-27 19:52 info dir clashes Federico Beffa
@ 2015-03-28 14:37 ` Ludovic Courtès
  2015-04-05 20:04   ` Federico Beffa
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-28 14:37 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> skribis:

> given that the file .../share/info/dir creates clashes in user
> profiles and that it is anyway handled with the help of info-dir
> substitutes, shouldn't we systematically delete them with the help,
> e.g., of a phase in gnu-build-system?

We should do that, indeed.  Would you like to prepare a patch for
‘core-updates’?

Thanks,
Ludo’.

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

* Re: info dir clashes
  2015-03-28 14:37 ` Ludovic Courtès
@ 2015-04-05 20:04   ` Federico Beffa
  2015-04-05 20:19     ` Mark H Weaver
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Beffa @ 2015-04-05 20:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

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

On Sat, Mar 28, 2015 at 3:37 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Federico Beffa <beffa@ieee.org> skribis:
>
>> given that the file .../share/info/dir creates clashes in user
>> profiles and that it is anyway handled with the help of info-dir
>> substitutes, shouldn't we systematically delete them with the help,
>> e.g., of a phase in gnu-build-system?
>
> We should do that, indeed.  Would you like to prepare a patch for
> ‘core-updates’?

Finally I prepared a patch for this.

Regards,
Fede

[-- Attachment #2: 0001-build-system-gnu-Add-delete-info-dir-file-phase.patch --]
[-- Type: text/x-diff, Size: 1544 bytes --]

From 06441ea6992808ef96139ab171269172dc65f2db Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Sun, 5 Apr 2015 21:59:18 +0200
Subject: [PATCH] build-system/gnu: Add 'delete-info-dir-file' phase.

* guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure.
  (%standard-phases): Use it.
---
 guix/build/gnu-build-system.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 5220bda..284d1ee 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -538,6 +538,15 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
         (format #t "not compressing documentation~%")
         #t)))
 
+(define* (delete-info-dir-file #:key outputs #:allow-other-keys)
+  (every (match-lambda
+          ((output . directory)
+           (let ((info-dir-file (string-append directory "/share/info/dir")))
+             (when (file-exists? info-dir-file)
+               (delete-file info-dir-file))
+             #t)))
+         outputs))
+
 (define %standard-phases
   ;; Standard build phases, as a list of symbol/procedure pairs.
   (let-syntax ((phases (syntax-rules ()
@@ -546,6 +555,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
             patch-usr-bin-file
             patch-source-shebangs configure patch-generated-file-shebangs
             build check install
+            delete-info-dir-file
             patch-shebangs strip
             validate-runpath
             validate-documentation-location
-- 
2.2.1


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

* Re: info dir clashes
  2015-04-05 20:04   ` Federico Beffa
@ 2015-04-05 20:19     ` Mark H Weaver
  2015-04-05 22:26       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2015-04-05 20:19 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa <beffa@ieee.org> writes:

> From 06441ea6992808ef96139ab171269172dc65f2db Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Sun, 5 Apr 2015 21:59:18 +0200
> Subject: [PATCH] build-system/gnu: Add 'delete-info-dir-file' phase.
>
> * guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure.
>   (%standard-phases): Use it.
> ---
>  guix/build/gnu-build-system.scm | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
> index 5220bda..284d1ee 100644
> --- a/guix/build/gnu-build-system.scm
> +++ b/guix/build/gnu-build-system.scm
> @@ -538,6 +538,15 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
>          (format #t "not compressing documentation~%")
>          #t)))
>  
> +(define* (delete-info-dir-file #:key outputs #:allow-other-keys)
> +  (every (match-lambda
> +          ((output . directory)
> +           (let ((info-dir-file (string-append directory "/share/info/dir")))
> +             (when (file-exists? info-dir-file)
> +               (delete-file info-dir-file))
> +             #t)))
> +         outputs))

In this case 'for-each' is the appropriate tool, since it ignores the
results of the procedure calls, which are made only for their side
effects.  So you can omit the #t.

Otherwise, looks good to me for 'core-updates'.

    Thanks!
      Mark

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

* Re: info dir clashes
  2015-04-05 20:19     ` Mark H Weaver
@ 2015-04-05 22:26       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-04-05 22:26 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> Federico Beffa <beffa@ieee.org> writes:
>
>> From 06441ea6992808ef96139ab171269172dc65f2db Mon Sep 17 00:00:00 2001
>> From: Federico Beffa <beffa@fbengineering.ch>
>> Date: Sun, 5 Apr 2015 21:59:18 +0200
>> Subject: [PATCH] build-system/gnu: Add 'delete-info-dir-file' phase.
>>
>> * guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure.
>>   (%standard-phases): Use it.
>> ---
>>  guix/build/gnu-build-system.scm | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
>> index 5220bda..284d1ee 100644
>> --- a/guix/build/gnu-build-system.scm
>> +++ b/guix/build/gnu-build-system.scm
>> @@ -538,6 +538,15 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
>>          (format #t "not compressing documentation~%")
>>          #t)))
>>  
>> +(define* (delete-info-dir-file #:key outputs #:allow-other-keys)
>> +  (every (match-lambda
>> +          ((output . directory)
>> +           (let ((info-dir-file (string-append directory "/share/info/dir")))
>> +             (when (file-exists? info-dir-file)
>> +               (delete-file info-dir-file))
>> +             #t)))
>> +         outputs))
>
> In this case 'for-each' is the appropriate tool, since it ignores the
> results of the procedure calls, which are made only for their side
> effects.  So you can omit the #t.

Agreed.

Also add a docstring please.

> Otherwise, looks good to me for 'core-updates'.

One last thing:

>              patch-usr-bin-file
>              patch-source-shebangs configure patch-generated-file-shebangs
>              build check install
> +            delete-info-dir-file
>              patch-shebangs strip
>              validate-runpath
>              validate-documentation-location

The phase should go after ‘validate-documentation-location’, which is
makes sure things are in share/info/ rather than info/.

OK to push to ‘core-updates’ with these changes.

Thanks!

Ludo’.

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

end of thread, other threads:[~2015-04-05 22:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27 19:52 info dir clashes Federico Beffa
2015-03-28 14:37 ` Ludovic Courtès
2015-04-05 20:04   ` Federico Beffa
2015-04-05 20:19     ` Mark H Weaver
2015-04-05 22:26       ` 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).