Skip to content

Commit

Permalink
Have repo url in repos hash
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Nov 17, 2024
1 parent 80bb4fe commit 8cfd518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scale_build/bootstrap/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
INSTALLED_PACKAGES_REGEX = re.compile(r'([^\t]+)\t([^\t]+)\t([\S]+)\n')


def get_repo_hash(repo_url, distribution):
def get_repo_hash(repo_url: str, distribution: str) -> str:
resp = requests.get(urllib.parse.urljoin(repo_url, os.path.join('dists', distribution, 'Release')), timeout=60)
resp.raise_for_status()
return hashlib.sha256(resp.content).hexdigest()
return hashlib.sha256(resp.content + repo_url.encode()).hexdigest()


def get_all_repo_hash():
Expand Down

0 comments on commit 8cfd518

Please sign in to comment.