images.js: add feature to configure device-specific packages#161
images.js: add feature to configure device-specific packages#161andibraeu wants to merge 1 commit intoopenwrt:mainfrom
Conversation
|
What is your use case here? openwrt already supports device specific packages. Would a general profile system make more send, like "NAS" installing USB drivers etc, or "VPN" to install wireguard etc? |
|
In freifunk we maintain lists of packages per device, like excluding In that feature, if you don't provide a file, everything works as before |
|
ok thanks for the clarification |
|
|
||
| const idsToTry = [deviceId]; | ||
| if (deviceId.includes("_")) { | ||
| idsToTry.push(deviceId.replace("_", ",")); |
There was a problem hiding this comment.
Is this done because the device id format changed during releases?
There was a problem hiding this comment.
I was unsure about that, but as this is a new feature we can just define one single device id format
|
Wouldn't it be nicer to put the content of But we would still need to support the array syntax as it is now. For backwards compatibility. The advantage would be that we have less configuration file clutter and simpler code. But maybe it is not worth it. |
That's why I thought it may be better to have another place for device specific packages. I also thought about inlining the config (and fun fact: in between I worked with such a solution), but then I realized that could overload the config.js itself when working with dozens of devices and packages. |
0d85ad7 to
0e03173
Compare
Signed-off-by: Andreas Bräu <ab@andi95.de>
0e03173 to
0d8a447
Compare
this adds the following feature:
device-specific packages can be configured on the server with a json file like this