Commit 0f46412d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a14348e6
......@@ -549,17 +549,18 @@ def spdx_license_canon(license_name):
def license_of(url):
assert '//' in url, url
_, xpath = url.split('//', 1) # https://tukaani.org/xz/xz-5.2.5.tar.bz2 -> tukaani.org/xz/xz-5.2.5.tar.bz
assert '//' not in xpath, xpath
#assert '//' not in xpath, xpath XXX archive.mariadb.org//mariadb-10.3.35/source/mariadb-10.3.35.tar.gz
assert '..' not in xpath, xpath
xpath = '.CACHE/src/'+xpath
if not exists(xpath):
# download + unpack -> xpath
print('DL %s ...' % url, file=sys.stderr)
mkdir_p('.CACHE/pkg')
pkgfile = '.CACHE/pkg/' + basename(xpath)
urlretrieve(url, pkgfile)
if not exists(pkgfile):
mkdir_p('.CACHE/pkg')
print('DL %s ...' % url, file=sys.stderr)
urlretrieve(url, pkgfile)
shutil.unpack_archive(pkgfile, xpath)
#shutil.unpack_archive(pkgfile, xpath)
# XXX
return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment