scripts: make sure conffiles are sorted conffiles
authorPaul Spooren <mail@aparcar.org>
Thu, 31 Mar 2022 21:51:29 +0000 (22:51 +0100)
committerPaul Spooren <mail@aparcar.org>
Thu, 31 Mar 2022 21:55:06 +0000 (22:55 +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..89f8d38bc18576cca644cc6a4090774e1e07a9d3 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