siemens / kas

Setup tool for bitbake based projects
MIT License
382 stars 152 forks source link

kas should copy .netrc file from default HOME dir as default #126

Open pBogey opened 3 months ago

pBogey commented 3 months ago

Hi,

I'm using kas version 4.2 and having some issues with do_fetch method of some recipe. I was debugging using plain bitbake commands and all was fine, while in CI it always failed to fetch some URL from a private repository and this drove me mad.

I have realized that kas is actually creating a temporary HOME directory which is kind of empty, except some .gitconfig and .aws files. I had to carefully read the do_fetch command to even realize this, as the command is pretty long and the HOME export is somewhere in the middle of it, so not really obvious.

Anyway, I think kas should pickup the .netrc file from the current user directory by default, unless otherwise specified through the NETRC_FILE environment variable. I see the value in this variable as providing a way to have custom files for specific builds only, but it should not mess up the classic bitbake build, as it currently does. And in a somewhat hidden way, on top of that, because it's not really obvious at first.

Thanks.

fmoessbauer commented 3 months ago

Hi, that's a two sided sword: One one side, kas wants to isolate the environment as good as possible to keep builds reproducible across systems. On the other side, it is quite tedious - as you said - to debug why things are not working as expected.

It would be good if we could move that discussion to the ML. I'm not against always picking up the .netrc, but I (and likely @jan-kiszka as well) want to hear more opinions about this.