FS#1981 - UCI import -m failes if invoked multiple times without commit
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start by reproducing the reported sequence with the uci command, the import-test file, and repeated uci -m import import-test < import-test invocations. Trace the import path responsible for the second and third invocations; done means repeated imports do not create unexpected changes or produce the reported parse error.
Written by the indexing model from the issue text.
Description
MOZGIII:
Hello, I'm using somewhat old LEDE, but this does not seem to make deffierence. Correct me if I'm wrong.
I installed fresh version of UCI:
root@router:~# opkg info uci
Package: uci
Version: 2018-08-11-4c8b4d6e-1
Depends: libc, libuci
Status: install user installed
Section: base
Architecture: mips_24kc
Size: 7166
Filename: uci_2018-08-11-4c8b4d6e-1_mips_24kc.ipk
Description: Utility for the Unified Configuration Interface (UCI)
Installed-Time: 1543713053
Now, the bug.
I have a small test file with some configs in it. They're named.
If I do import multiple times it results if an error.
Here's my shell log that should to reproduce this issue:
root@router:# uci commit # make sure there're no pending changes# rm -f /etc/config/import-test # clear the target cofnig file for a clean test
root@router:
root@router:~# cat import-test # dispay the file we're about to import
config host 'a'
option name 'a'
config host 'b'
option name 'b'
root@router:# uci changes # demonstrate there're no pending changes# uci -m import import-test < import-test # invoke the import
root@router:
root@router:# uci changes # still no changes after first import# uci -m import import-test < import-test # import import for the second time
root@router:
root@router:# uci changes # wow, now there are some changes! this is not expected# uci -m import import-test < import-test # call import for the third time - and it fails with an error
import-test.a='host'
import-test.b='host'
root@router:
uci: Parse error (option/list command found before the first section) at line 2, byte 1
This looks like a bug to me. Thoughts?
- Dominant language
- C
- Stars
- 28.5k
- Forks
- 13k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 160
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openwrt/openwrt
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug Official Image release/25.12 Supported Device target/x86
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug Official Image release/24.10 Supported Device target/mediatek
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[wifi-scripts] EHT320 center frequency table only covers 320-1, breaks channels >61 in ETSI regions Openbug release/25.12 Self Built Image Supported Device target/mediatek
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100