[openwrt/openwrt] scripts: make sure conffiles are sorted

LEDE Commits lede-commits at lists.infradead.org
Fri Apr 1 05:09:44 PDT 2022


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/56ce110b73970bcd65d309440baada84c8e1504b

commit 56ce110b73970bcd65d309440baada84c8e1504b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Thu Mar 31 22:51:29 2022 +0100

    scripts: make sure conffiles are sorted
    
    It may happen that conffiles are in different order on different builds.
    Make sure they have the same order by sorting them.
    
    FIX: #9612
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 scripts/ipkg-build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index c112270a2b..32bc4b6d50 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -58,7 +58,8 @@ pkg_appears_sane() {
 
 		rm "$CONTROL"/conffiles
 		if [ -f "$CONTROL"/conffiles.resolved ]; then
-			mv "$CONTROL"/conffiles.resolved "$CONTROL"/conffiles
+			sort -o "$CONTROL"/conffiles "$CONTROL"/conffiles.resolved
+			rm "$CONTROL"/conffiles.resolved
 			chmod 0644 "$CONTROL"/conffiles
 		fi
 	fi




More information about the lede-commits mailing list