scripts: make sure conffiles are sorted
authorPaul Spooren <mail@aparcar.org>
Thu, 31 Mar 2022 21:51:29 +0000 (22:51 +0100)
committerPaul Spooren <mail@aparcar.org>
Fri, 1 Apr 2022 12:08:58 +0000 (13:08 +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>
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