GNU bug report logs - #43249
Resolve Calibre run-time dependency

Previous Next

Package: guix-patches;

Reported by: Prafulla Giri <pratheblackdiamond <at> gmail.com>

Date: Sun, 6 Sep 2020 18:33:01 UTC

Severity: normal

Done: Andreas Enge <andreas <at> enge.fr>

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 43249 in the body.
You can then email your comments to 43249 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#43249; Package guix-patches. (Sun, 06 Sep 2020 18:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Prafulla Giri <pratheblackdiamond <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 06 Sep 2020 18:33:02 GMT) Full text and rfc822 format available.

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

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: Resolve Calibre run-time dependency
Date: Mon, 7 Sep 2020 00:17:23 +0545
[Message part 1 (text/plain, inline)]
Esteemed maintainers,

Currently, Calibre can't open .epub files unless `qtwebengine` package is
also available in one's $GUIX_PROFILE. Neither can the stand-alone
`ebook-viewer` program supplied with Calibre. It exits with the complaint:
"Could not find QtWebEngineProcess".

Attached is a patch to fix the issue. QtWebEngineProcess is now made
available to all Calibre binaries via QTWEBENGINE_PATH set during a new
'wrap-program phase introduced with the patch.

Thank you
[Message part 2 (text/html, inline)]
[0001-gnu-calibre-make-QtWebEngineProcess-available-during.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Sun, 06 Sep 2020 20:10:01 GMT) Full text and rfc822 format available.

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

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org
Subject: Re: [bug#43249] Resolve Calibre run-time dependency
Date: Sun, 6 Sep 2020 22:09:19 +0200
Brendan already proposed a patch for this problem in his series updating
calibre to 4.22.0 see http://issues.guix.gnu.org/42885#4

Sorry for the duplicated effort, but maybe you can chime in there. It
seems so that there is some work left to get the update merged...

On 06.09.20 20:32, Prafulla Giri wrote:
> Esteemed maintainers,
>
> Currently, Calibre can't open .epub files unless `qtwebengine` package is
> also available in one's $GUIX_PROFILE. Neither can the stand-alone
> `ebook-viewer` program supplied with Calibre. It exits with the complaint:
> "Could not find QtWebEngineProcess".
>
> Attached is a patch to fix the issue. QtWebEngineProcess is now made
> available to all Calibre binaries via QTWEBENGINE_PATH set during a new
> 'wrap-program phase introduced with the patch.
>
> Thank you
>




Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Mon, 07 Sep 2020 08:13:02 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: "Prafulla Giri <pratheblackdiamond"@gmail.com,
 Andreas Enge <andreas <at> enge.fr>
Cc: 43249 <at> debbugs.gnu.org, 43151 <at> debbugs.gnu.org
Subject: Re: Resolve Calibre run-time dependency
Date: Mon, 7 Sep 2020 18:12:37 +1000
There is actually a Bug report by Andreas for this very issue. I created 
a bug report just for updating, and fixed this issue after it while I 
could, without realising. Sorry for all the confusion with things 
happening in 3 different threads.

I created an updated patch just for this one here. 
https://issues.guix.gnu.org/43151#5

Your patch also works I think but it will wrap the programs twice, so 
you will get calibre, .calibre-real, and ..calibre-real-real, etc for 
every program, which seems ugly. My patch reproduces the same PYTHONPATH 
that is set in python-build-system in addition to wrapping PYTHONPATH 
(unless I made a mistake), although at the cost of code duplication. I 
leave it to you and who ever is reviewing this to decide which way is 
more correct and push one, haha.


Please continue any discussion of the QtWebEngine bug on issue 43121: 
43151 <at> debbugs.gnu.org / https://issues.guix.gnu.org/43151





Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Tue, 08 Sep 2020 12:23:02 GMT) Full text and rfc822 format available.

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

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: 43249 <at> debbugs.gnu.org
Cc: mail <at> brendan.scot
Date: Tue, 8 Sep 2020 18:07:23 +0545
[Message part 1 (text/plain, inline)]
I see.

Yes, it does make sense now why you chose to replace the 'wrap phase.

I wonder.... perhaps it'd be better altogether if the (wrap-program)
procedure could be re-written to not make ..*.real.real programs...? That
would save us a lot of code-duplication...
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Tue, 08 Sep 2020 13:39:02 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org
Subject: Re:
Date: Tue, 8 Sep 2020 23:38:25 +1000
On 8/9/20 10:22 pm, Prafulla Giri wrote:
> I see.
>
> Yes, it does make sense now why you chose to replace the 'wrap phase.
>
> I wonder.... perhaps it'd be better altogether if the (wrap-program) 
> procedure could be re-written to not make ..*.real.real programs...? 
> That would save us a lot of code-duplication...

Actually there is such a thing that can be use for scripts. It's 
wrap-script. I had sort of forgotten about it because I believe it has a 
bug where it passes command line arguments incorrectly, so wasn't using 
it: https://issues.guix.gnu.org/40039 . Would be worth looking in to again.





Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Tue, 08 Sep 2020 19:57:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Prafulla Giri <pratheblackdiamond <at> gmail.com>
Cc: 43249 <at> debbugs.gnu.org, guix-patches <at> gnu.org, mail <at> brendan.scot
Subject: Re: [bug#43249]
Date: Tue, 08 Sep 2020 21:57:38 +0200
Prafulla Giri <pratheblackdiamond <at> gmail.com> writes:

> I wonder.... perhaps it'd be better altogether if the (wrap-program)
> procedure could be re-written to not make ..*.real.real programs...? That
> would save us a lot of code-duplication...

Looking at the definition of wrap-program in (guix build utils) there is
code that checks if the wrapper already exists; if it does it should
append the new environment variable definitions to the existing
wrapper.  It looks like this doesn’t work reliably.

If someone could figure out why that is we could fix this in the next
core-updates cycle.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Tue, 08 Sep 2020 19:57:02 GMT) Full text and rfc822 format available.

Reply sent to Andreas Enge <andreas <at> enge.fr>:
You have taken responsibility. (Tue, 08 Sep 2020 20:13:02 GMT) Full text and rfc822 format available.

Notification sent to Prafulla Giri <pratheblackdiamond <at> gmail.com>:
bug acknowledged by developer. (Tue, 08 Sep 2020 20:13:03 GMT) Full text and rfc822 format available.

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

From: Andreas Enge <andreas <at> enge.fr>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 42885 <at> debbugs.gnu.org, 43249-done <at> debbugs.gnu.org,
 Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43151-done <at> debbugs.gnu.org
Subject: Re: bug#43151: Resolve Calibre run-time dependency
Date: Tue, 8 Sep 2020 22:11:44 +0200
Hello,

On Mon, Sep 07, 2020 at 06:15:15PM +1000, Brendan Tildesley wrote:
> Your patch also works I think but it will wrap the programs twice, so
> you will get calibre, .calibre-real, and ..calibre-real-real, etc for
> every program, which seems ugly. My patch reproduces the same PYTHONPATH
> that is set in python-build-system in addition to wrapping PYTHONPATH
> (unless I made a mistake), although at the cost of code duplication. I
> leave it to you and who ever is reviewing this to decide which way is
> more correct and push one, haha.

thanks to both of your for your patches! I just pushed Brendan's, which
wraps only once at the price of copy-pasting from another package. I confirm
that it works, also to click on an epub file from within calibre. Closing
the two bugs asking about qtwebengine.

Concerning the update, is mathjax a required input now, or could we just
leave it out and update nevertheless?

Andreas





Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Wed, 09 Sep 2020 08:39:02 GMT) Full text and rfc822 format available.

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

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 42885 <at> debbugs.gnu.org, 43249-done <at> debbugs.gnu.org,
 Brendan Tildesley <mail <at> brendan.scot>, 43151-done <at> debbugs.gnu.org
Subject: Re: bug#43151: Resolve Calibre run-time dependency
Date: Wed, 9 Sep 2020 14:23:34 +0545
[Message part 1 (text/plain, inline)]
I see. Thank you for the update.

Hopefully (wrap-program) will be fixed soon. That should save us a lot of
code-duplication.

Congratulations, Mr. Tildesley! (:
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Thu, 10 Sep 2020 12:47:02 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org,
 guix-patches <at> gnu.org
Subject: Re: [bug#43249]
Date: Thu, 10 Sep 2020 22:46:33 +1000
On 9/9/20 5:57 am, Ricardo Wurmus wrote:
> Prafulla Giri <pratheblackdiamond <at> gmail.com> writes:
>
>> I wonder.... perhaps it'd be better altogether if the (wrap-program)
>> procedure could be re-written to not make ..*.real.real programs...? That
>> would save us a lot of code-duplication...
> Looking at the definition of wrap-program in (guix build utils) there is
> code that checks if the wrapper already exists; if it does it should
> append the new environment variable definitions to the existing
> wrapper.  It looks like this doesn’t work reliably.
>
> If someone could figure out why that is we could fix this in the next
> core-updates cycle.
>
When given "foo", wrap-program checks if ".foo-real" exists and thus 
concludes that "foo" is a wrapper and appends, however, despite the fact 
that the wrapper? procedure exists, it is not actually used at any time 
to check if ".foo-real" its self was passed to wrap-program. Therefore 
it happily wraps wrappers if it is given one. For example 
glib-or-gtk-build-system uses (find-files bindir ".*") to find files to 
pass to wrap-program. This ".*" regular expression matches hidden 
dotfiles. I copy-pasted everything to make a new build system and added 
an error for (wrapper? prog) and it exposed this. changingI guess then 
we should patch wrap-program to add

(when (wrapper? prog)
    (error (string-append prog " is a wrapper. Refusing to wrap.")))

at the start.

Then fix all uses of wrap-program so that they dont recieve -real files.

In glib-or-gtk-build-system.scm, chanding bin-list to:

(bin-list     (filter (lambda (file) (not (wrapper? file)))
                                     (append (find-files bindir ".*")
                                             (find-files libexecdir 
".*"))))

seems to fix it, at least in the case of gedit, a program that currently 
produces a nested wrapper. Ill play with it more tomorrow.





Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Thu, 10 Sep 2020 12:47:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Thu, 10 Sep 2020 13:22:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org,
 guix-patches <at> gnu.org
Subject: Re: [bug#43249]
Date: Thu, 10 Sep 2020 15:22:17 +0200
Brendan Tildesley <mail <at> brendan.scot> writes:

> I guess then we should patch wrap-program to add
>
> (when (wrapper? prog)
>     (error (string-append prog " is a wrapper. Refusing to wrap.")))

Should it really refuse to wrap or *add* its variables to the existing
wrapper?

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Thu, 10 Sep 2020 13:22:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Fri, 11 Sep 2020 08:19:01 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org,
 guix-patches <at> gnu.org
Subject: Re: [bug#43249]
Date: Fri, 11 Sep 2020 18:18:21 +1000
[Message part 1 (text/plain, inline)]
On 10/9/20 11:22 pm, Ricardo Wurmus wrote:
> Brendan Tildesley <mail <at> brendan.scot> writes:
>
>> I guess then we should patch wrap-program to add
>>
>> (when (wrapper? prog)
>>      (error (string-append prog " is a wrapper. Refusing to wrap.")))
> Should it really refuse to wrap or *add* its variables to the existing
> wrapper?
>
If there is a /bin/foo and /bin/.foo-real created by wrap-program, and 
we are to run another wrap-program phase, under what circumstances would 
it /not/ be a mistake to call (wrap-program "/bin/.foo-real") instead of 
(wrap-program "/bin/foo")? And if the first one was called, probably it 
was because find-files was used and the packager didn't realise it was 
happening, and therefore it will be double-wrapped, like gedit is.

[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Fri, 11 Sep 2020 08:19:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Fri, 11 Sep 2020 08:38:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: Prafulla Giri <pratheblackdiamond <at> gmail.com>, 43249 <at> debbugs.gnu.org
Subject: Re: [bug#43249]
Date: Fri, 11 Sep 2020 10:38:55 +0200
Brendan Tildesley <mail <at> brendan.scot> writes:

> On 10/9/20 11:22 pm, Ricardo Wurmus wrote:
>> Brendan Tildesley <mail <at> brendan.scot> writes:
>>
>>> I guess then we should patch wrap-program to add
>>>
>>> (when (wrapper? prog)
>>>      (error (string-append prog " is a wrapper. Refusing to wrap.")))
>> Should it really refuse to wrap or *add* its variables to the existing
>> wrapper?
>>
> If there is a /bin/foo and /bin/.foo-real created by wrap-program, and
> we are to run another wrap-program phase, under what circumstances
> would it /not/ be a mistake to call (wrap-program "/bin/.foo-real")
> instead of (wrap-program "/bin/foo")? And if the first one was called,
> probably it was because find-files was used and the packager didn't
> realise it was happening, and therefore it will be double-wrapped,
> like gedit is.

Oh, yes, that would be a mistake.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Sat, 12 Sep 2020 11:35:02 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 43249 <at> debbugs.gnu.org
Subject: Re: [bug#43249]
Date: Sat, 12 Sep 2020 21:33:57 +1000
On 11/9/20 6:38 pm, Ricardo Wurmus wrote:
> Brendan Tildesley <mail <at> brendan.scot> writes:
>
>> On 10/9/20 11:22 pm, Ricardo Wurmus wrote:
>>> Brendan Tildesley <mail <at> brendan.scot> writes:
>>>
>>>> I guess then we should patch wrap-program to add
>>>>
>>>> (when (wrapper? prog)
>>>>       (error (string-append prog " is a wrapper. Refusing to wrap.")))
>>> Should it really refuse to wrap or *add* its variables to the existing
>>> wrapper?
>>>
>> If there is a /bin/foo and /bin/.foo-real created by wrap-program, and
>> we are to run another wrap-program phase, under what circumstances
>> would it /not/ be a mistake to call (wrap-program "/bin/.foo-real")
>> instead of (wrap-program "/bin/foo")? And if the first one was called,
>> probably it was because find-files was used and the packager didn't
>> realise it was happening, and therefore it will be double-wrapped,
>> like gedit is.
> Oh, yes, that would be a mistake.
>
While we're at it, what do you think about changing the moved file from 
/bin/.foo-real into /bin/.real/foo, or maybe it would have to go up a 
directory and go into /.bin-real/foo. That would mean all these dot 
files wouldn't pollute PATH and appear in things like bemenu, or in 
window titles. Also pkill should be able to kill correctly based on the 
name. Would it break more things somehow?





Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Sat, 12 Sep 2020 12:21:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 43249 <at> debbugs.gnu.org
Subject: Re: [bug#43249]
Date: Sat, 12 Sep 2020 14:21:50 +0200
Brendan Tildesley <mail <at> brendan.scot> writes:

> On 11/9/20 6:38 pm, Ricardo Wurmus wrote:
>> Brendan Tildesley <mail <at> brendan.scot> writes:
>>
>>> On 10/9/20 11:22 pm, Ricardo Wurmus wrote:
>>>> Brendan Tildesley <mail <at> brendan.scot> writes:
>>>>
>>>>> I guess then we should patch wrap-program to add
>>>>>
>>>>> (when (wrapper? prog)
>>>>>       (error (string-append prog " is a wrapper. Refusing to wrap.")))
>>>> Should it really refuse to wrap or *add* its variables to the existing
>>>> wrapper?
>>>>
>>> If there is a /bin/foo and /bin/.foo-real created by wrap-program, and
>>> we are to run another wrap-program phase, under what circumstances
>>> would it /not/ be a mistake to call (wrap-program "/bin/.foo-real")
>>> instead of (wrap-program "/bin/foo")? And if the first one was called,
>>> probably it was because find-files was used and the packager didn't
>>> realise it was happening, and therefore it will be double-wrapped,
>>> like gedit is.
>> Oh, yes, that would be a mistake.
>>
> While we're at it, what do you think about changing the moved file
> from /bin/.foo-real into /bin/.real/foo, or maybe it would have to go
> up a directory and go into /.bin-real/foo. That would mean all these
> dot files wouldn't pollute PATH and appear in things like bemenu, or
> in window titles. Also pkill should be able to kill correctly based on
> the name. Would it break more things somehow?

I’d rather not move these things to other directories because some
applications are very sensitive to relative location.

I think we should be using “wrap-script” where possible (because many
wrapped applications really are scripts) and think of another in-place
wrapping mechanism for binaries.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Sun, 13 Sep 2020 12:44:01 GMT) Full text and rfc822 format available.

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

From: Brendan Tildesley <mail <at> brendan.scot>
To: Prafulla Giri <pratheblackdiamond <at> gmail.com>
Cc: Andreas Enge <andreas <at> enge.fr>, 43249 <at> debbugs.gnu.org
Subject: Re:
Date: Sun, 13 Sep 2020 22:43:27 +1000
[Message part 1 (text/plain, inline)]
On 8/9/20 10:22 pm, Prafulla Giri wrote:
> I see.
>
> Yes, it does make sense now why you chose to replace the 'wrap phase.
>
> I wonder.... perhaps it'd be better altogether if the (wrap-program) 
> procedure could be re-written to not make ..*.real.real programs...? 
> That would save us a lot of code-duplication...

I have come to understand wrap-program a little better and I realised 
your patch could have actually been fixed in a better way than I did. 
The issue is with the part of your code that runs


(find-files "." ".*")


This is what matches all the .calibre-real files

If instead of that, it was:

(find-files "." (lambda (file stat) (not (wrapper? file))))

or

(find-files "." (lambda (file stat) (not (string-prefix "." (basename 
file))))

It should avoid double wrapping. An even simpler way would have been to 
use (add-before 'wrap ..., instead of (add-after 'wrap ...

If you are still interested, feel free to make a patch overwriting mine 
to use this more correct method, instead of where i duplicated the wrap 
PYTHONPATH bit.

The fact that this happened is a bug though. I created some patches I 
think fix this for core-updates. It would have made your original patch 
error and force you to fix it: https://issues.guix.gnu.org/43367

[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Tue, 15 Sep 2020 11:52:01 GMT) Full text and rfc822 format available.

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

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 43249 <at> debbugs.gnu.org
Subject: Re:
Date: Tue, 15 Sep 2020 17:35:47 +0545
[Message part 1 (text/plain, inline)]
Dear Mr. Tildesley,

I have sent in a patch to do as you've suggested.
https://issues.guix.gnu.org/43419

Thank you very much.

I will remember this trick of not wrapping wrappers from now on. Thank you
very much.

On Sun, Sep 13, 2020 at 6:28 PM Brendan Tildesley <mail <at> brendan.scot> wrote:

> On 8/9/20 10:22 pm, Prafulla Giri wrote:
>
> I see.
>
> Yes, it does make sense now why you chose to replace the 'wrap phase.
>
> I wonder.... perhaps it'd be better altogether if the (wrap-program)
> procedure could be re-written to not make ..*.real.real programs...? That
> would save us a lot of code-duplication...
>
> I have come to understand wrap-program a little better and I realised your
> patch could have actually been fixed in a better way than I did. The issue
> is with the part of your code that runs
>
>
> (find-files "." ".*")
>
>
> This is what matches all the .calibre-real files
> If instead of that, it was:
>
> (find-files "." (lambda (file stat) (not (wrapper? file))))
>
> or
>
> (find-files "." (lambda (file stat) (not (string-prefix "." (basename
> file))))
> It should avoid double wrapping. An even simpler way would have been to
> use (add-before 'wrap ..., instead of (add-after 'wrap ...
>
> If you are still interested, feel free to make a patch overwriting mine to
> use this more correct method, instead of where i duplicated the wrap
> PYTHONPATH bit.
>
> The fact that this happened is a bug though. I created some patches I
> think fix this for core-updates. It would have made your original patch
> error and force you to fix it: https://issues.guix.gnu.org/43367
>
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43249; Package guix-patches. (Fri, 18 Sep 2020 13:27:01 GMT) Full text and rfc822 format available.

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

From: Prafulla Giri <pratheblackdiamond <at> gmail.com>
To: Brendan Tildesley <mail <at> brendan.scot>
Cc: 43249 <at> debbugs.gnu.org
Subject: Re:
Date: Fri, 18 Sep 2020 19:11:05 +0545
[Message part 1 (text/plain, inline)]
Mr. Tildesley,

The patch has just been merged: https://issues.guix.gnu.org/43419#1

Thank you for your guidance!

On Tue, Sep 15, 2020 at 5:35 PM Prafulla Giri <pratheblackdiamond <at> gmail.com>
wrote:

> Dear Mr. Tildesley,
>
> I have sent in a patch to do as you've suggested.
> https://issues.guix.gnu.org/43419
>
> Thank you very much.
>
> I will remember this trick of not wrapping wrappers from now on. Thank you
> very much.
>
> On Sun, Sep 13, 2020 at 6:28 PM Brendan Tildesley <mail <at> brendan.scot>
> wrote:
>
>> On 8/9/20 10:22 pm, Prafulla Giri wrote:
>>
>> I see.
>>
>> Yes, it does make sense now why you chose to replace the 'wrap phase.
>>
>> I wonder.... perhaps it'd be better altogether if the (wrap-program)
>> procedure could be re-written to not make ..*.real.real programs...? That
>> would save us a lot of code-duplication...
>>
>> I have come to understand wrap-program a little better and I realised
>> your patch could have actually been fixed in a better way than I did. The
>> issue is with the part of your code that runs
>>
>>
>> (find-files "." ".*")
>>
>>
>> This is what matches all the .calibre-real files
>> If instead of that, it was:
>>
>> (find-files "." (lambda (file stat) (not (wrapper? file))))
>>
>> or
>>
>> (find-files "." (lambda (file stat) (not (string-prefix "." (basename
>> file))))
>> It should avoid double wrapping. An even simpler way would have been to
>> use (add-before 'wrap ..., instead of (add-after 'wrap ...
>>
>> If you are still interested, feel free to make a patch overwriting mine
>> to use this more correct method, instead of where i duplicated the wrap
>> PYTHONPATH bit.
>>
>> The fact that this happened is a bug though. I created some patches I
>> think fix this for core-updates. It would have made your original patch
>> error and force you to fix it: https://issues.guix.gnu.org/43367
>>
>>
[Message part 2 (text/html, inline)]

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

This bug report was last modified 3 years and 191 days ago.

Previous Next


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