Skip to content

Commit

Permalink
build: deterministic package order
Browse files Browse the repository at this point in the history
The order of packages handed over to the ImageBuilder isn't stable when
using `diff_packages`, sort the packages afterwards to be deterministic.

This recently introduced a reproducibility issues where packages are in
different order, resulting packages to be sometimes installed as
dependencies (Auto-Install in OPKG) and sometimes not.

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Mar 31, 2022
1 parent 269ae47 commit 990c7bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asu/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def download_file(filename: str, dest: str = None):
"make",
"manifest",
f"PROFILE={req['profile']}",
f"PACKAGES={' '.join(req.get('packages', ''))}",
f"PACKAGES={' '.join(sorted(req.get('packages', [])))}",
"STRIP_ABI=1",
],
text=True,
Expand Down Expand Up @@ -294,7 +294,7 @@ def download_file(filename: str, dest: str = None):
"make",
"image",
f"PROFILE={req['profile']}",
f"PACKAGES={' '.join(req.get('packages', []))}",
f"PACKAGES={' '.join(sorted(req.get('packages', [])))}",
f"EXTRA_IMAGE_NAME={packages_hash}",
f"BIN_DIR={req['store_path'] / bin_dir}",
]
Expand Down

0 comments on commit 990c7bb

Please sign in to comment.