Skip to content

Commit 4dfef4c

Browse files
committed
fix(fetch): Include revision in hashing for pypi
1 parent 1bbc714 commit 4dfef4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

acbs/fetch.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ def fetch_source(info: List[ACBSSourceInfo], source_location: str, package_name:
2727
logging.info(f'Fetching source ({count}/{len(info)})...')
2828
# in generate mode, we need to fetch all the sources
2929
if not i.enabled and not generate_mode:
30-
logging.info(f'Source {count} skipped.')
31-
url_hash = hash_url(i.url)
30+
logging.info(f"Source {count} skipped.")
31+
# special handling for PyPI type
32+
url = i.url if i.type != "pypi" else f"pypi://{i.url}/{i.revision}"
33+
url_hash = hash_url(url)
3234
fetch_source_inner(i, source_location, url_hash)
3335
return None
3436

0 commit comments

Comments
 (0)