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
333051ab
Commit
333051ab
authored
Oct 28, 2022
by
Mario Oenning
Committed by
Leonidas Spyropoulos
Oct 28, 2022
Browse files
feat: add field "Submitter" to metadata-archives
parent
48e5dc67
Pipeline
#35937
passed with stages
in 2 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
aurweb/scripts/mkpkglists.py
View file @
333051ab
...
...
@@ -163,6 +163,7 @@ def as_dict(package: Package) -> dict[str, Any]:
"Popularity"
:
float
(
package
.
Popularity
),
"OutOfDate"
:
package
.
OutOfDate
,
"Maintainer"
:
package
.
Maintainer
,
"Submitter"
:
package
.
Submitter
,
"FirstSubmitted"
:
package
.
FirstSubmitted
,
"LastModified"
:
package
.
LastModified
,
}
...
...
@@ -190,10 +191,13 @@ def _main():
logger
.
warning
(
f
"
{
sys
.
argv
[
0
]
}
is deprecated and will be soon be removed"
)
logger
.
info
(
"Started re-creating archives, wait a while..."
)
Submitter
=
orm
.
aliased
(
User
)
query
=
(
db
.
query
(
Package
)
.
join
(
PackageBase
,
PackageBase
.
ID
==
Package
.
PackageBaseID
)
.
join
(
User
,
PackageBase
.
MaintainerUID
==
User
.
ID
,
isouter
=
True
)
.
join
(
Submitter
,
PackageBase
.
SubmitterUID
==
Submitter
.
ID
,
isouter
=
True
)
.
filter
(
PackageBase
.
PackagerUID
.
isnot
(
None
))
.
with_entities
(
Package
.
ID
,
...
...
@@ -207,6 +211,7 @@ def _main():
PackageBase
.
Popularity
,
PackageBase
.
OutOfDateTS
.
label
(
"OutOfDate"
),
User
.
Username
.
label
(
"Maintainer"
),
Submitter
.
Username
.
label
(
"Submitter"
),
PackageBase
.
SubmittedTS
.
label
(
"FirstSubmitted"
),
PackageBase
.
ModifiedTS
.
label
(
"LastModified"
),
)
...
...
test/test_mkpkglists.py
View file @
333051ab
...
...
@@ -30,6 +30,7 @@ META_KEYS = [
"Popularity"
,
"OutOfDate"
,
"Maintainer"
,
"Submitter"
,
"FirstSubmitted"
,
"LastModified"
,
"URLPath"
,
...
...
@@ -61,7 +62,12 @@ def packages(user: User) -> list[Package]:
lic
=
db
.
create
(
License
,
Name
=
"GPL"
)
for
i
in
range
(
5
):
# Create the package.
pkgbase
=
db
.
create
(
PackageBase
,
Name
=
f
"pkgbase_
{
i
}
"
,
Packager
=
user
)
pkgbase
=
db
.
create
(
PackageBase
,
Name
=
f
"pkgbase_
{
i
}
"
,
Packager
=
user
,
Submitter
=
user
,
)
pkg
=
db
.
create
(
Package
,
PackageBase
=
pkgbase
,
Name
=
f
"pkg_
{
i
}
"
)
# Create some related records.
...
...
Leonidas Spyropoulos
@artafinde
mentioned in issue
#400 (closed)
·
Oct 28, 2022
mentioned in issue
#400 (closed)
mentioned in issue #400
Toggle commit list
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