relocate /etc/deviceinfo to /usr/share, allow user overrides
#1836 (comment 1277043534)
Update! Proposal for discussion here:Old description / ancient history
In a patch discussion[1], I expressed my opinion that users should not modify /etc/deviceinfo
, and that this file should be "owned" by the device package entirely. The reason for this is that device maintainers may fix issues or enable new stuff in deviceinfo, and if the user modifies it then the updates are not installed by apk. They are installed as /etc/deviceinfo.apk-new
, which may lead to the issue "experiencing" a "regression" or other unintended behavior. They could run update-conf
, but that's manual, and probably daunting for most folks to deal with. I think we should strive to make options in /etc/deviceinfo
override-able in other ways if/when necessary.
@pabloyoyoista raised the idea that we should relocate the deviceinfo file to /usr/share, in order to remove any ambiguity around who should be able to modify the file: !3349 (comment 1146035649)
We could support an /etc/deviceinfo
that is merged with the one from the device package in /usr/share/deviceinfo
(or whatever you want to call it). This would be quite easy to do, since sourcing one after the other would cause vars set in the 2nd sourced file to override vars set in the 1st sourced file. Apps that load /etc/deviceinfo
today would need to be patched to load /usr/share
first, then /etc/deviceinfo
next. Or we could get really fancy with an /etc/deviceinfo.d/* that can contain a bunch of user-supplied changes, but tbh that sounds like a lot of complexity for a relatively simple file that likely wouldn't see a lot of user-initiated changes...
I'd like to know what others think about this, specifically if 1) my opinion above about users not modifying deviceinfo is agreeable, and if it is then 2) how we should go about making it more clear that users should not modify it?