Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nxd-bom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
nxd-bom
Commits
0f46412d
Commit
0f46412d
authored
Jun 12, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a14348e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
nxdbom/__init__.py
nxdbom/__init__.py
+6
-5
No files found.
nxdbom/__init__.py
View file @
0f46412d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment