Discussion:
[WIP][PATCH] profiles: info-dir-file: Don't consider unwanted manifest entries
(too old to reply)
宋文武
2017-12-15 15:12:10 UTC
Permalink
Raw Message
Hello!

Currently we run profile hooks for all manifest inputs, so if you
install a new package to your profile, all profile hooks will be run
again, even if the new package doesn't provide info manuals, man pages,
etc. Ideally only interested hooks need to be run, eg: if the new
package has info manuals, then the 'info-dir-file' hook will run.

I get it works somehow, but breaks the '--dry-run' functionality which I
have no idea how to preserve...
Martin Castillo
2017-12-15 15:40:33 UTC
Permalink
Raw Message
Hi,

in the second patch file:
> + ;; We only need to build the 'dir' file for inputs that does
containing info
> + ;; manuals.
s/containing/contain

On 15.12.2017 16:12, 宋文武 wrote:> Hello!
>
> Currently we run profile hooks for all manifest inputs, so if you
> install a new package to your profile, all profile hooks will be run
> again, even if the new package doesn't provide info manuals, man pages,
> etc. Ideally only interested hooks need to be run, eg: if the new
> package has info manuals, then the 'info-dir-file' hook will run.

One would need to filter man-pages too, right?
+ (define interested
+ (eval-gexp
+ #~(filter
+ (lambda (input)
+ (or (file-exists? (string-append input "/share/info"))
+ (file-exists? (string-append input "/share/man"))))
+ '#$(manifest-inputs manifest))))

>
> I get it works somehow, but breaks the '--dry-run' functionality which I
> have no idea how to preserve...
>
>
>
>
>
> Needing help and directions, thanks!
>

I can barely write scheme. I can't help much, sorry.

Martin

--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
宋文武
2017-12-22 11:21:23 UTC
Permalink
Raw Message
Martin Castillo <***@uni-bremen.de> writes:

> Hi,
>
> in the second patch file:
>> + ;; We only need to build the 'dir' file for inputs that does
> containing info
>> + ;; manuals.
> s/containing/contain
>

Okay, thanks!

> On 15.12.2017 16:12, 宋文武 wrote:> Hello!
>>
>> Currently we run profile hooks for all manifest inputs, so if you
>> install a new package to your profile, all profile hooks will be run
>> again, even if the new package doesn't provide info manuals, man pages,
>> etc. Ideally only interested hooks need to be run, eg: if the new
>> package has info manuals, then the 'info-dir-file' hook will run.
>
> One would need to filter man-pages too, right?

Yes, that need be done in the 'manual-database' hook.
Ludovic Courtès
2017-12-18 09:28:16 UTC
Permalink
Raw Message
Hello!

***@member.fsf.org (宋文武) skribis:

> Currently we run profile hooks for all manifest inputs, so if you
> install a new package to your profile, all profile hooks will be run
> again, even if the new package doesn't provide info manuals, man pages,
> etc. Ideally only interested hooks need to be run, eg: if the new
> package has info manuals, then the 'info-dir-file' hook will run.
>
> I get it works somehow, but breaks the '--dry-run' functionality which I
> have no idea how to preserve...

Indeed. I had the idea of adding a notion of “build rounds”, which
would also be useful for grafts: you’d register (client-side) an extra
build round to be run after the current one. For grafts, the first
round would return the ungrafted derivations. For profile hooks, the
first round would return the profile without any hooks. “-n” would
display what would be built/downloaded as part of the first round,
ignoring subsequent rounds.

I realize that’s a lot hand-waving, so I’ll have to see if I can get a
proof-of-concept ready in the coming weeks.

Ludo’.
宋文武
2018-01-01 10:37:47 UTC
Permalink
Raw Message
***@gnu.org (Ludovic Courtès) writes:

> Hello!
>
> ***@member.fsf.org (宋文武) skribis:
>
>> Currently we run profile hooks for all manifest inputs, so if you
>> install a new package to your profile, all profile hooks will be run
>> again, even if the new package doesn't provide info manuals, man pages,
>> etc. Ideally only interested hooks need to be run, eg: if the new
>> package has info manuals, then the 'info-dir-file' hook will run.
>>
>> I get it works somehow, but breaks the '--dry-run' functionality which I
>> have no idea how to preserve...
>
> Indeed. I had the idea of adding a notion of “build rounds”, which
> would also be useful for grafts: you’d register (client-side) an extra
> build round to be run after the current one. For grafts, the first
> round would return the ungrafted derivations. For profile hooks, the
> first round would return the profile without any hooks. “-n” would
> display what would be built/downloaded as part of the first round,
> ignoring subsequent rounds.
>

Hello, happy new year! So I have just disable profile hooks for the
'dry-run' now and send patches to guix-patches.
Loading...