GNU bug report logs - #26771
[PATCH] build-system/gnu: Fix compress-documentation phase

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 4 May 2017 07:54:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26771 in the body.
You can then email your comments to 26771 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26771; Package guix-patches. (Thu, 04 May 2017 07:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 04 May 2017 07:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] build-system/gnu: Fix compress-documentation phase
Date: Thu, 04 May 2017 00:53:24 -0700
[Message part 1 (text/plain, inline)]
Hello Guix!

This patch fixes a small defect in compress-documentation phase of our
gnu-build-system. The phase could create dangling manual
page symlinks in the case those were recursive.

One package which exhibited the issue is Gimp; you might have noticed
the `find-files' error message when the manual page database gets
created on a profile generation as a consequence of that.

Here's the Gimp example in some more details:

* The manual pages under share/man/man1 before the documentation is
  compressed:
  
     gimp.1 -> gimp-2.8.1                  
     gimp-2.8.1                            
     gimp-console.1 -> gimp-console-2.8.1  
     gimp-console-2.8.1 -> gimp-2.8.1      
     gimptool-2.0.1

* After the documentation is compressed:

     gimp.1 -> gimp-2.8.1.gz
     gimp-2.8.1.gz
     gimp-console.1 -> gimp-console-2.8.1.gz
     gimp-console-2.8.1 -> gimp-2.8.1.gz
     gimptool-2.0.1.gz

We can see that the gimp-console.1 link now points to an unexisting
file. To correct the problem, a `points-to-symbolic-link?' predicate is
added and its negation is used to filter out the links which shouldn't
be retargetted.

I didn't test this by rebuilding the world; rather, I exercised the
`compress-documentation' function at the REPL, feeding it a copied gimp
derivation output as it appeared before the problematic
compress-documentation phase.

It should be applied to core-updates since it triggers a rebuild of all
the packages using the GNU build system.

Maxim

[0001-build-system-gnu-Fix-compress-documentation-phase.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 30 May 2017 20:00:02 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Tue, 30 May 2017 20:00:03 GMT) Full text and rfc822 format available.

Message #10 received at 26771-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 26771-done <at> debbugs.gnu.org
Subject: Re: bug#26771: [PATCH] build-system/gnu: Fix compress-documentation
 phase
Date: Tue, 30 May 2017 21:59:10 +0200
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> This patch fixes a small defect in compress-documentation phase of our
> gnu-build-system. The phase could create dangling manual
> page symlinks in the case those were recursive.
>
> One package which exhibited the issue is Gimp; you might have noticed
> the `find-files' error message when the manual page database gets
> created on a profile generation as a consequence of that.
>
> Here's the Gimp example in some more details:
>
> * The manual pages under share/man/man1 before the documentation is
>   compressed:
>   
>      gimp.1 -> gimp-2.8.1                  
>      gimp-2.8.1                            
>      gimp-console.1 -> gimp-console-2.8.1  
>      gimp-console-2.8.1 -> gimp-2.8.1      
>      gimptool-2.0.1
>
> * After the documentation is compressed:
>
>      gimp.1 -> gimp-2.8.1.gz
>      gimp-2.8.1.gz
>      gimp-console.1 -> gimp-console-2.8.1.gz
>      gimp-console-2.8.1 -> gimp-2.8.1.gz
>      gimptool-2.0.1.gz
>
> We can see that the gimp-console.1 link now points to an unexisting
> file. To correct the problem, a `points-to-symbolic-link?' predicate is
> added and its negation is used to filter out the links which shouldn't
> be retargetted.
>
> I didn't test this by rebuilding the world; rather, I exercised the
> `compress-documentation' function at the REPL, feeding it a copied gimp
> derivation output as it appeared before the problematic
> compress-documentation phase.

Thanks for the detailed analysis and patch!

> From 81b5ade74a7debbde30a98ac5dc884844f6dfeb7 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> Date: Tue, 25 Apr 2017 01:46:05 +0900
> Subject: [PATCH] build-system/gnu: Fix compress-documentation phase
>
> The compress-documentation phase was breaking recursive symbolic links used
> for manuals, which was made visible by the `find-files' call in the recently
> added `manual-database' profile hook.
>
> * guix/build/gnu-build-system.scm (retarget-symblink)[link]: Rename to
> `symbolic-link' (`link' is a Guile function).
> (points-to-symbolic-link?): Add predicate.
> (maybe-compress-directory): Rename `symlinks' to `symbolic-links', use
> `points-to-symbolic-link?' to filter out symbolic links which shouldn't be
> retargetted and re-order the calls to `retarget-symlink' and `documentation-compressor'.

I pushed it as facac292808d11d5e6ea528cc7dbe93595f62c9b, where I removed
the “symbolic-link” renames, which I thought were unnecessary and
unrelated.

Apologies for the delay!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26771; Package guix-patches. (Wed, 31 May 2017 03:53:01 GMT) Full text and rfc822 format available.

Message #13 received at 26771-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 26771-done <at> debbugs.gnu.org
Subject: Re: bug#26771: [PATCH] build-system/gnu: Fix compress-documentation
 phase
Date: Tue, 30 May 2017 20:52:05 -0700
Hi Ludovic,

ludo <at> gnu.org (Ludovic Courtès) writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> This patch fixes a small defect in compress-documentation phase of our
>> gnu-build-system. The phase could create dangling manual
>> page symlinks in the case those were recursive.
>>
>> One package which exhibited the issue is Gimp; you might have noticed
>> the `find-files' error message when the manual page database gets
>> created on a profile generation as a consequence of that.
>>
>> Here's the Gimp example in some more details:
>>
>> * The manual pages under share/man/man1 before the documentation is
>>   compressed:
>>   
>>      gimp.1 -> gimp-2.8.1                  
>>      gimp-2.8.1                            
>>      gimp-console.1 -> gimp-console-2.8.1  
>>      gimp-console-2.8.1 -> gimp-2.8.1      
>>      gimptool-2.0.1
>>
>> * After the documentation is compressed:
>>
>>      gimp.1 -> gimp-2.8.1.gz
>>      gimp-2.8.1.gz
>>      gimp-console.1 -> gimp-console-2.8.1.gz
>>      gimp-console-2.8.1 -> gimp-2.8.1.gz
>>      gimptool-2.0.1.gz
>>
>> We can see that the gimp-console.1 link now points to an unexisting
>> file. To correct the problem, a `points-to-symbolic-link?' predicate is
>> added and its negation is used to filter out the links which shouldn't
>> be retargetted.
>>
>> I didn't test this by rebuilding the world; rather, I exercised the
>> `compress-documentation' function at the REPL, feeding it a copied gimp
>> derivation output as it appeared before the problematic
>> compress-documentation phase.
>
> Thanks for the detailed analysis and patch!
>
>> From 81b5ade74a7debbde30a98ac5dc884844f6dfeb7 Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>> Date: Tue, 25 Apr 2017 01:46:05 +0900
>> Subject: [PATCH] build-system/gnu: Fix compress-documentation phase
>>
>> The compress-documentation phase was breaking recursive symbolic links used
>> for manuals, which was made visible by the `find-files' call in the recently
>> added `manual-database' profile hook.
>>
>> * guix/build/gnu-build-system.scm (retarget-symblink)[link]: Rename to
>> `symbolic-link' (`link' is a Guile function).
>> (points-to-symbolic-link?): Add predicate.
>> (maybe-compress-directory): Rename `symlinks' to `symbolic-links', use
>> `points-to-symbolic-link?' to filter out symbolic links which shouldn't be
>> retargetted and re-order the calls to `retarget-symlink' and `documentation-compressor'.
>
> I pushed it as facac292808d11d5e6ea528cc7dbe93595f62c9b, where I removed
> the “symbolic-link” renames, which I thought were unnecessary and
> unrelated.

Thanks!

> Apologies for the delay!

No need for apologies! I can't say my responses are very timely either,
so I understand. I'm rather amazed at how you seemingly manage to keep
pace with all the activity happening around here (same goes for rekado,
lfam and the other most active maintainers/contributors). Hats off to
all of you!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 28 Jun 2017 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.