Skip to content

Commit

Permalink
fix: keep request_hashe consistent
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed Feb 15, 2025
1 parent 3770090 commit 355b5af
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions asu/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def get_request_hash(build_request: BuildRequest) -> str:
build_request.version_code,
build_request.target,
build_request.profile.replace(",", "_"),
get_packages_hash(build_request.packages),
get_packages_hash(
build_request.packages_versions.keys() or build_request.packages
),
get_manifest_hash(build_request.packages_versions),
str(build_request.diff_packages),
"", # build_request.filesystem
Expand All @@ -164,9 +166,19 @@ def get_packages_hash(packages: list[str]) -> str:
packages (list): list of packages
Returns:
str: hash of `req`
str: hash of `packages`
"""
return get_str_hash(" ".join(sorted(list(set(packages)))))
return get_str_hash(
" ".join(
sorted(
list(
set(
(x.removeprefix("+") for x in packages),
)
)
)
)
)


def fingerprint_pubkey_usign(pubkey: str) -> str:
Expand Down

0 comments on commit 355b5af

Please sign in to comment.