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
Levin Zimmermann
nxd-bom
Commits
f46be314
Commit
f46be314
authored
Jun 05, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix support for libstemmer_c
It comes without a version. Occurs in Wendelin.
parent
ed3cf0a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
nxdbom/__init__.py
nxdbom/__init__.py
+6
-1
nxdbom/nxdbom_test.py
nxdbom/nxdbom_test.py
+10
-0
No files found.
nxdbom/__init__.py
View file @
f46be314
...
@@ -53,7 +53,12 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
...
@@ -53,7 +53,12 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
if
version
is
not
None
:
if
version
is
not
None
:
assert
ver
is
None
assert
ver
is
None
ver
=
version
ver
=
version
assert
ver
is
not
None
,
urlpath
if
ver
is
None
:
# some packages come without version in the url
if
name
in
(
'libstemmer_c'
,):
ver
=
''
else
:
assert
ver
is
not
None
,
urlpath
ver
=
removeprefix
(
ver
,
name
+
'-'
)
# wendelin.core-2.0.alpha3-0-g6315384 -> 2.0.alpha3-0-g6315384
ver
=
removeprefix
(
ver
,
name
+
'-'
)
# wendelin.core-2.0.alpha3-0-g6315384 -> 2.0.alpha3-0-g6315384
if
'//'
in
urlpath
:
if
'//'
in
urlpath
:
url
=
urlpath
url
=
urlpath
...
...
nxdbom/nxdbom_test.py
View file @
f46be314
...
@@ -44,6 +44,7 @@ from os.path import dirname, exists
...
@@ -44,6 +44,7 @@ from os.path import dirname, exists
(
'http://www.cups.org/software/1.7.4/cups-1.7.4-source.tar.bz2'
,
'cups'
,
'1.7.4'
),
(
'http://www.cups.org/software/1.7.4/cups-1.7.4-source.tar.bz2'
,
'cups'
,
'1.7.4'
),
(
'https://github.com/unicode-org/icu/releases/download/release-58-2/icu4c-58_2-src.tgz'
,
'icu4c'
,
'58_2'
),
(
'https://github.com/unicode-org/icu/releases/download/release-58-2/icu4c-58_2-src.tgz'
,
'icu4c'
,
'58_2'
),
(
'https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f'
,
'onlyoffice_core'
,
'8a40eb47bd80a40ecde14c223525b21852d2fc9f'
),
(
'https://lab.nexedi.com/bk/onlyoffice_core/repository/archive.tar.bz2?ref=8a40eb47bd80a40ecde14c223525b21852d2fc9f'
,
'onlyoffice_core'
,
'8a40eb47bd80a40ecde14c223525b21852d2fc9f'
),
(
'http://snowball.tartarus.org/dist/libstemmer_c.tgz'
,
'libstemmer_c'
,
None
),
])
])
def
test_namever
(
url
,
nameok
,
verok
):
def
test_namever
(
url
,
nameok
,
verok
):
assert
nxdbom
.
namever
(
url
)
==
(
nameok
,
verok
)
assert
nxdbom
.
namever
(
url
)
==
(
nameok
,
verok
)
...
@@ -394,6 +395,15 @@ url = http://downloadarchive.documentfoundation.org/libreoffice/old/5.2.4.2/rpm/
...
@@ -394,6 +395,15 @@ url = http://downloadarchive.documentfoundation.org/libreoffice/old/5.2.4.2/rpm/
LibreOffice 5.2.4.2 http://downloadarchive.documentfoundation.org/libreoffice/old/5.2.4.2/rpm/x86_64/LibreOffice_5.2.4.2_Linux_x86-64_rpm.tar.gz
LibreOffice 5.2.4.2 http://downloadarchive.documentfoundation.org/libreoffice/old/5.2.4.2/rpm/x86_64/LibreOffice_5.2.4.2_Linux_x86-64_rpm.tar.gz
"""
)
"""
)
# libstemmer_c comes without version
case1
(
"""
\
[libstemmer]
recipe = slapos.recipe.cmmi
url = http://snowball.tartarus.org/dist/libstemmer_c.tgz
"""
,
"""
\
libstemmer_c http://snowball.tartarus.org/dist/libstemmer_c.tgz
"""
)
@
pytest
.
mark
.
parametrize
(
'build,bomok'
,
testv
)
@
pytest
.
mark
.
parametrize
(
'build,bomok'
,
testv
)
def
test_bom_software
(
tmpdir
,
build
,
bomok
):
def
test_bom_software
(
tmpdir
,
build
,
bomok
):
...
...
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