The package URL is relative to the index URL

This fixes a regression introduced by f7ab15e390.

In case of a devpi repository,
- the index url looks like

    https://devpi.company/company/dev/+simple/python-package

- the package relative URL looks like

    /../../+f/d00/a3edd114f3e81/package.tar.gz#sha256=d00a3edd114f3e813e0e22e07513361b00d925fb67057a3452a897c8623f73f6

- the URL to download the package is

    https://devpi.company/company/dev/+f/d00/a3edd114f3e81/package.tar.gz#sha256=d00a3edd114f3e813e0e22e07513361b00d925fb67057a3452a897c8623f73f6

With the commit f7ab15e390, the URL to
download the package was

    https://devpi.company/+f/d00/a3edd114f3e81/package.tar.gz#sha256=d00a3edd114f3e813e0e22e07513361b00d925fb67057a3452a897c8623f73f6

which doesn't exist.
This commit is contained in:
Antoine Eiche 2022-01-11 09:37:05 +01:00
parent bc70a5c975
commit 48c228ac63

View file

@ -84,7 +84,7 @@ if urlparse(parser.sources[package_filename]).netloc == '':
package_url = urlunparse((
parsed_url.scheme,
parsed_url.netloc,
parser.sources[package_filename],
parsed_url.path + "/" + parser.sources[package_filename],
None, None, None,
))
else: