Bug 213413 - Make config-recursive recompute dependencies when options change
Summary: Make config-recursive recompute dependencies when options change
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 12:21 UTC by Pietro Cerutti
Modified: 2016-10-12 15:59 UTC (History)
2 users (show)

See Also:


Attachments
Recompute dependencies at each step (523 bytes, patch)
2016-10-12 12:21 UTC, Pietro Cerutti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti freebsd_committer 2016-10-12 12:21:10 UTC
Created attachment 175660 [details]
Recompute dependencies at each step

The config-recursive target does not recompute dependencies when options change. This could lead the user to miss dependencies (when they are brought in by a non-default option selected) or to go through unnecessary ports (when dependencies are removed by unselecting an option).

The patch attached makes config-recursive a bit slower but more correct by recomputing the dependencies by reinvoking "make all-depends-list" in a subshell at each step.
Comment 1 Miroslav Lachman 2016-10-12 13:09:41 UTC
Will this work in poudriere too? I am not sure if it calls config-recursive or not but it is extremely annoying to walk through all the unchecked dependency trees. In some edge cases it means tens of useless options dialogs

So thank you for your work on this!
Comment 2 Pietro Cerutti freebsd_committer 2016-10-12 13:18:03 UTC
Yes, poudriere is the reason I investigated this in the first place :)
Comment 3 Mathieu Arnold freebsd_committer 2016-10-12 13:47:43 UTC
This is a good way to start, but it still is painful.
If the default options are good for me, I select "cancel" so that there is not a configuration saved that could become non default afterwards, and for base ports, like python, or perl, their make config screen will be shown over and over again.
Comment 4 Pietro Cerutti freebsd_committer 2016-10-12 15:17:42 UTC
I see. Do you have a solution for this?
Comment 5 Mathieu Arnold freebsd_committer 2016-10-12 15:56:30 UTC
no :-p
Comment 6 Mathieu Arnold freebsd_committer 2016-10-12 15:59:09 UTC
Well, no, that's a lie, there is a solution, it would be to extract the config-recursive target into its own script, and then rework it to note which ports have been configured, and skip them if they ever come back.

It won't solve the problem of the config screens coming back when you run poudriere options foo/bar bar/bam if some port is a dependency of both, but it is a start.