[FS#3730] resolve_conffiles reports spurious errors

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Thu Apr 8 16:10:35 BST 2021


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#3730 - resolve_conffiles reports spurious errors
User who did this - Nick (kousu)

----------
Here's a prototype of my first suggestion; given the reported conflicts above, I translated them into `uci`'s cli syntax, which implicitly imposes a canonical format:


root at router:~# TMP=$(mktemp -d)
root at router:~# uci show luci > $TMP/luci
root at router:~# uci show luci-opkg | sed 's/^luci-opkg/luci/' > $TMP/luci-opkg
root at router:~# diff -u $TMP/luci-opkg $TMP/luci
--- /tmp/tmp.LNmpnm/luci-opkg	2021-04-08 11:07:26.422562972 -0400
+++ /tmp/tmp.LNmpnm/luci	2021-04-08 11:07:14.892396639 -0400
@@ -18,8 +18,13 @@
 luci.ccache=internal
 luci.ccache.enable='1'
 luci.themes=internal
+luci.themes.Bootstrap='/luci-static/bootstrap'
 luci.apply=internal
 luci.apply.rollback='90'
 luci.apply.holdoff='4'
 luci.apply.timeout='5'
 luci.apply.display='1.5'
+luci.diag=internal
+luci.diag.dns='openwrt.org'
+luci.diag.ping='openwrt.org'
+luci.diag.route='openwrt.org'


That diff is much easier to read and merge manually.



Here's a prototype of my second idea, by getting `uci` to regenerate the file:


root at router:~# cp /etc/config/luci-opkg /etc/config/luci-opkg-canonical
root at router:~# uci show luci-opkg-canonical | xargs -n 1 uci set && uci commit
root at router:~# diff -u /etc/config/luci-opkg-canonical /etc/config/luci-mine
--- /etc/config/luci-opkg-canonical	2021-04-08 11:01:48.000000000 -0400
+++ /etc/config/luci-mine	2021-01-30 05:15:01.000000000 -0500
@@ -24,6 +24,7 @@
 	option enable '1'
 
 config internal 'themes'
+	option Bootstrap '/luci-static/bootstrap'
 
 config internal 'apply'
 	option rollback '90'
@@ -31,3 +32,8 @@
 	option timeout '5'
 	option display '1.5'
 
+config internal 'diag'
+	option dns 'openwrt.org'
+	option ping 'openwrt.org'
+	option route 'openwrt.org'
+


You can see that both of these are the same diff, just one is in the cli format and the other is in the config file format. uci took care of replacing tabs and other extra whitespace with single spaces, and double quotes with single quotes, so that the files are directly comparable.


What would you say to making `resolve_conffiles` run `uci show $CONFFILE-opkg | xargs -n 1 uci set && uci commit` as a first step?
----------

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3730#comment9551

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list