Don't know if this is considered a bug or not.
[Note: I'm still running 19.7, this may have been addressed in 21.2.]
This is regarding the uci maintained files under /etc/config.
It is not required to update these files with uci. The documentation indicates it's quite OK to directly edit the files in /etc/config. However, there seems to be no consistency in how values are quoted: sometimes with no quotes, sometimes double quotes, sometimes single quotes. It also seems packages change what they do from version to version, but other reasons could give this appearance.
In digging into this I've re-read: https://openwrt.org/docs/guide-user/base-system/uci
The documentation doesn't state a "correct" quote style to use. Except to say quotes must be used when the value contains a space. But it seems that single and double quotes are syntactically identical (unlike a shell where they have different symatics). Further, values are often quoted even when they don't have a space.
The reason for raising this and why I find it problematic is when upgrading packages.
During my most recent package updates, these messages were reported:
* resolve_conffiles: Existing conffile /etc/config/luci is different from the conffile in the new package. The new conffile will be placed at /etc/config/luci-opkg. * resolve_conffiles: Existing conffile /etc/config/ucitrack is different from the conffile in the new package. The new conffile will be placed at /etc/config/ucitrack-opkg.
A common warning during an upgrade.
When I do a diff to find out the changes I find most lines don't match but it's only because of different quotes have been used.
I did further testing of changing values using the "uci" tool and found it (always?) puts values in single quotes (even when spaces are not present).
- Is there a reason why one quoting style isn't recommendedmandated?
- Given that uci puts all values in single quotes should that become the default?
- Is it considered a bug for config files to be inconsistent with what's produced by uci?