Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmbootstrap
Commits
444d9e25
Unverified
Commit
444d9e25
authored
5 months ago
by
Oliver Smith
Browse files
Options
Downloads
Patches
Plain Diff
pmaports._find_apkbuilds: use new cache logic (MR 2480)
Use the nice @Cache decorator that Caleb introduced earlier.
parent
214abed0
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!2480
pmaports.find: show extra-repos/systemd hint
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/helpers/pmaports.py
+1
-10
1 addition, 10 deletions
pmb/helpers/pmaports.py
with
1 addition
and
10 deletions
pmb/helpers/pmaports.py
+
1
−
10
View file @
444d9e25
...
...
@@ -18,13 +18,8 @@ from pmb.meta import Cache
import
pmb.parse
@Cache
(
"
skip_extra_repos
"
)
def
_find_apkbuilds
(
skip_extra_repos
:
bool
=
False
)
->
dict
[
str
,
Path
]:
# Try to get a cached result first (we assume that the aports don't change
# in one pmbootstrap call)
apkbuilds
=
pmb
.
helpers
.
other
.
cache
.
get
(
"
pmb.helpers.pmaports.apkbuilds
"
)
if
apkbuilds
is
not
None
:
return
apkbuilds
apkbuilds
=
{}
for
package
in
pkgrepo_iter_package_dirs
(
skip_extra_repos
=
skip_extra_repos
):
pkgname
=
package
.
name
...
...
@@ -38,10 +33,6 @@ def _find_apkbuilds(skip_extra_repos: bool = False) -> dict[str, Path]:
# Sort dictionary so we don't need to do it over and over again in
# get_list()
apkbuilds
=
dict
(
sorted
(
apkbuilds
.
items
()))
# Save result in cache
if
not
skip_extra_repos
:
pmb
.
helpers
.
other
.
cache
[
"
pmb.helpers.pmaports.apkbuilds
"
]
=
apkbuilds
return
apkbuilds
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment