linux-automation / meta-lxatac

Build your own LXA TAC images and bundles
MIT License
5 stars 15 forks source link

meta-lxatac-software: labgrid: allow overriding USB ports in userconfig #14

Closed hnez closed 1 year ago

hnez commented 1 year ago

This should make it easier to attach USB hubs to the TAC and getting the matches right.

I'm not too experienced with jinja2 so I've had some trouble working around the scoping rules (seting a variable in a included file does not have an effect on the file that did the includeing, but modifing the variable in another way does). And preventing the output from my usb_ports.pop and .extend tricks from being rendered (that's what the and '' andor ''` are for). Maybe you have some better idea.

@a3f could this be of any use to you?

hnez commented 1 year ago

We will most likely ship new default userconfig.yamls then and now with added features etc.. Users that do incremental updates from release to release via rauc install may however never see those. Should we add a special case to our rauc hook.sh to create a userconfig.yaml.default or something like that with the file shipped by the bundle?

SmithChart commented 1 year ago

We will most likely ship new default userconfig.yamls then and now with added features etc.. Users that do incremental updates from release to release via rauc install may however never see those. Should we add a special case to our rauc hook.sh to create a userconfig.yaml.default or something like that with the file shipped by the bundle?

How about deploying our file as userconfig.yaml and userconfig.yaml.default. But only migrate userconfig.yaml. In this case we should probably add a comment to the file describing what file does what.

In case of a breaking change we must inform the user in the changelog, I guess.

hnez commented 1 year ago

How about deploying our file as userconfig.yaml and userconfig.yaml.default. But only migrate userconfig.yaml. In this case we should probably add a comment to the file describing what file does what.

I like that. See the implementation I've just pushed.