UCI -m import bug?

Thibaut hacks at slashdirt.org
Thu Nov 17 06:23:51 PST 2022


Hi,

I’ve experienced the following uci behavior on 21.02 and 22.03:

$ cat > foo << EOF
config foo 'foo'
option bar '1'
EOF
$ uci -m import foo < foo
$ uci -m import foo < foo
$ uci -m import foo < foo
uci: Parse error (option/list command found before the first section) at line 2, byte 0

In other words, uci will not merge on top of an existing, uncommitted merge. Adding an « uci commit foo » between both import calls « fixes » the issue.

Regular repeated import (without '-m') causes no error.

Additionally, if one rm -rf /tmp/.uci and runs the test again, the failure occurs at the second invocation, not the third.

It looks like a bug to me but maybe this is « expected behavior » ?

Cheers,
T


More information about the openwrt-devel mailing list