scripts: make sure conffiles are sorted
authorPaul Spooren <mail@aparcar.org>
Thu, 31 Mar 2022 21:51:29 +0000 (22:51 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 6 Apr 2022 12:59:44 +0000 (13:59 +0100)
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@aparcar.org>
(cherry picked from commit 56ce110b73970bcd65d309440baada84c8e1504b)

scripts/ipkg-build

index c112270a2bc6b2b18eeca9f7659db7b218a2b946..32bc4b6d503b6beb40d122ad2da037d3a68397d3 100755 (executable)
@@ -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