From 1f348505a4de54a19257f6f82f62d711e874d325 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Thu, 6 Aug 2026 18:10:39 +0200 Subject: [PATCH] Apply patches in a deterministic order The patches of a package were collected with glob.glob(), which returns the directory entries in filesystem order. Two patches of the same package could therefore be listed in either order across machines and runs, so regenerating the recipes produced a spurious diff and, more importantly, the patches could be applied in the wrong order. Sort the glob result, so the patches of a package are always applied in the lexicographic order of their file names, which is what the usual 0001-/0002- prefixes are meant to express. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- vinca/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vinca/main.py b/vinca/main.py index 8357850..aab193b 100644 --- a/vinca/main.py +++ b/vinca/main.py @@ -190,7 +190,7 @@ def read_vinca_yaml(filepath): vinca_conf["_patch_dir"] = patch_dir patches = {} - for x in glob.glob(os.path.join(vinca_conf["_patch_dir"], "*.patch")): + for x in sorted(glob.glob(os.path.join(vinca_conf["_patch_dir"], "*.patch"))): splitted = os.path.basename(x).split(".") if splitted[0] not in patches: patches[splitted[0]] = {