[OpenWrt-Devel] UCI config bug or intent?
dominik.taborsky at nic.cz
Wed Mar 25 06:28:14 EDT 2015
a colleague of mine discovered a problem when using UCI: when there's a clash of identifiers, they mix together regardless of their type and the last type is set as the type of the identifier. Let me show an example:
root at turris:/etc/config# cat conflicting_config
config typeA 'sec1'
list device 'dev1'
list ignore 'dev2'
config typeA 'sec2'
list device 'dev2'
list ignore 'dev3'
config typeB 'sec1'
list activate 'dev3'
list activate 'dev4'
option socket 'false'
root at turris:/etc/config# uci show conflicting_config
root at turris:/etc/config# uci show conflicting_config. at typeA
As you can see, UCI shows only one section named 'sec1' of typeB, while there are two sections of that name of different types. It mixes the options and lists together and does not report any problem with this. I would expect either to report a problem or consider these as different objects with the same name. A workaround for this is to use anonymous sections with an option with the name as the value, but I still think there at least should be a warning. I don't know how to report such a problem from within the UCI library though.
So what do you think?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel