Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
451ef4b8
Commit
451ef4b8
authored
Jul 13, 2012
by
Clément Schreiner
Browse files
Complete BinPackages datasource.
parent
abc8a314
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/plugins/debtags.py
View file @
451ef4b8
...
...
@@ -149,11 +149,16 @@ class BinPackages(datasources.DataSource):
pkg_from_repo
=
repository
.
get_bin_package
(
p
.
name
,
p
.
arch
)
section
=
p
.
package_version
.
section
section
=
'libs'
desc
=
pkg_from_repo
.
get
(
'Description'
,
None
)
sdesc
,
ldesc
=
utils
.
splitdesc
(
desc
)
section
=
'libs'
re_multivalue
=
re
.
compile
(
r
'\s*,\s*'
)
def
mv
(
name
):
"Get list value for multivalue field"
return
[
x
for
x
in
re_multivalue
.
split
(
pkg_from_repo
.
get
(
name
,
""
))
if
x
]
info
=
datasources
.
Pkg
(
p
.
name
,
p
.
package_version
.
version
,
p
.
package_version
.
package
.
name
,
...
...
@@ -161,11 +166,11 @@ class BinPackages(datasources.DataSource):
sdesc
,
ldesc
,
[
p
.
arch
],
[]
,
#
pre
deps
[],
# dep
s
[],
# r
ecommends
[],
# s
uggests
[],
# e
nhances
mv
(
'Pre-Depends'
)
,
# deps
mv
(
'Depends'
),
# recommend
s
mv
(
'R
ecommends
'
),
# suggests
mv
(
'S
uggests
'
),
mv
(
'E
nhances
'
),
p
.
package_version
.
distribution
)
self
.
by_name
[
p
.
name
]
=
info
self
.
by_section
.
setdefault
(
section
,
[]).
append
(
info
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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