cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

[DEV] menu path can be absolute or relative #128

Closed Louson closed 1 year ago

Louson commented 1 year ago

When the menu path given in the command init (or cook) started with '/', its absolute path is stored (after symlinks resolution). If not, its path relative to the .cookerconfig is stored (after symlinks resolution).

The aim is to enable to initialize and download the sources in a host machine and build in a container which may have a different location.

pboettch commented 1 year ago

Hmm, good idea. I think we should always store a relative path to the menu in the config-file. Or is there a reason for strong full-paths?

I think we should realpath it (to resolved symlinks) and then store as relative path.

The inconvenience I see is that cooker initialized dir cannot be moved anymore as it would not find the menu any longer.

Louson commented 1 year ago

My reason would be to not work against the user. If an absolute path is given in arguments, there is no reason to make it relative and it might be confusing.

pboettch commented 1 year ago

I see your point. In my usage experience I actually don't remember when and how I ran cooker init when using my projects because I basically never use init (and cook) which need a menu.

Ok for letting the user choose, but how to inform the user about this choice and why which choice is better than the other and if which circumstances?

Updating the README? At least.

Louson commented 1 year ago

Here is a suggestion for the README

pboettch commented 1 year ago

Great job!