Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
aurweb
Commits
6ee34ab3
Commit
6ee34ab3
authored
Oct 31, 2022
by
Mario Oenning
Committed by
Leonidas Spyropoulos
Oct 31, 2022
Browse files
feat: add field "CoMaintainers" to metadata-archives
parent
333051ab
Pipeline
#36326
passed with stages
in 3 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
aurweb/scripts/mkpkglists.py
View file @
6ee34ab3
...
...
@@ -142,6 +142,21 @@ def get_extended_fields():
)
.
distinct
()
.
order_by
(
"Name"
),
# Co-Maintainer
db
.
query
(
models
.
PackageComaintainer
)
.
join
(
models
.
User
,
models
.
User
.
ID
==
models
.
PackageComaintainer
.
UsersID
)
.
join
(
models
.
Package
,
models
.
Package
.
PackageBaseID
==
models
.
PackageComaintainer
.
PackageBaseID
,
)
.
with_entities
(
models
.
Package
.
ID
,
literal
(
"CoMaintainers"
).
label
(
"Type"
),
models
.
User
.
Username
.
label
(
"Name"
),
literal
(
str
()).
label
(
"Cond"
),
)
.
distinct
()
.
order_by
(
"Name"
),
]
query
=
subqueries
[
0
].
union_all
(
*
subqueries
[
1
:])
return
get_extended_dict
(
query
)
...
...
test/test_mkpkglists.py
View file @
6ee34ab3
...
...
@@ -11,6 +11,7 @@ from aurweb.models import (
License
,
Package
,
PackageBase
,
PackageComaintainer
,
PackageDependency
,
PackageLicense
,
User
,
...
...
@@ -79,6 +80,7 @@ def packages(user: User) -> list[Package]:
DepName
=
f
"dep_
{
i
}
"
,
DepCondition
=
">=1.0"
,
)
db
.
create
(
PackageComaintainer
,
User
=
user
,
PackageBase
=
pkgbase
,
Priority
=
1
)
# Add the package to our output list.
output
.
append
(
pkg
)
...
...
@@ -229,6 +231,7 @@ def test_mkpkglists_extended(config_mock: None, user: User, packages: list[Packa
assert
key
in
pkg
,
f
"
{
pkg
=
}
record does not have
{
key
=
}
"
assert
isinstance
(
pkg
[
"Depends"
],
list
)
assert
isinstance
(
pkg
[
"License"
],
list
)
assert
isinstance
(
pkg
[
"CoMaintainers"
],
list
)
for
file
in
(
PACKAGES
,
PKGBASE
,
USERS
,
META
,
META_EXT
):
with
open
(
f
"
{
file
}
.sha256"
)
as
f
:
...
...
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