Skip to content

Commit 2e3301f

Browse files
authored
Remove qpkg download URL purl2url support (#203)
* Remove qpkg download URL purl2url support Signed-off-by: Tushar Goel <[email protected]> * Remove tests Signed-off-by: Tushar Goel <[email protected]> --------- Signed-off-by: Tushar Goel <[email protected]>
1 parent 0defc22 commit 2e3301f

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/packageurl/contrib/purl2url.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -647,21 +647,6 @@ def build_deb_download_url(purl_str: str) -> str:
647647
return f"{base_url}{pool_path}/{filename}"
648648

649649

650-
@download_router.route("pkg:qpkg/.*")
651-
def build_qpkg_download_url(purl: str) -> str:
652-
purl = PackageURL.from_string(purl)
653-
repo_url = purl.qualifiers.get("repo_url")
654-
655-
if not repo_url:
656-
raise ValueError("repository_url qualifier is required for qpkg purl resolution")
657-
658-
if not purl.namespace or not purl.name or not purl.version:
659-
raise ValueError("namespace, name, and version must be present in qpkg purl")
660-
661-
path = f"{purl.namespace}/{purl.name}/{purl.version}.qpkg"
662-
return f"{repo_url.rstrip('/')}/{path}"
663-
664-
665650
@download_router.route("pkg:apk/.*")
666651
def build_apk_download_url(purl):
667652
"""

tests/contrib/test_purl2url.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def test_purl2url_get_download_url():
112112
"pkg:alpm/arch/[email protected]?arch=x86_64": "https://archive.archlinux.org/packages/p/pacman/pacman-6.0.1-1-x86_64.pkg.tar.zst",
113113
"pkg:deb/debian/attr@1:2.4.48-6?arch=amd64": "https://deb.debian.org/debian/pool/main/a/attr/attr_2.4.48-6_amd64.deb",
114114
"pkg:deb/debian/attr@1:2.4.48-6?arch=amd64&repository_url=http://archive.debian.org/debian": "http://archive.debian.org/debian/pool/main/a/attr/attr_2.4.48-6_amd64.deb",
115-
"pkg:qpkg/blackberry/[email protected]?repo_url=http://repo.blackberry.com": "http://repo.blackberry.com/blackberry/com.qnx.sdp/7.0.0.SGA201702151847.qpkg",
116115
"pkg:apk/[email protected]?arch=x86&alpine_version=v3.11&repo=main": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86/acct-6.6.4-r0.apk",
117116
# From `download_url` qualifier
118117
"pkg:github/yarnpkg/[email protected]?download_url=https://github.com/yarnpkg/yarn/releases/download/v1.3.2/yarn-v1.3.2.tar.gz&version_prefix=v": "https://github.com/yarnpkg/yarn/releases/download/v1.3.2/yarn-v1.3.2.tar.gz",

0 commit comments

Comments
 (0)