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
641a4a8d
Unverified
Commit
641a4a8d
authored
5 months ago
by
Caleb Connolly
Browse files
Options
Downloads
Patches
Plain Diff
WIP
Signed-off-by:
Caleb Connolly
<
caleb@postmarketos.org
>
parent
513f52cb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/helpers/apk.py
+28
-2
28 additions, 2 deletions
pmb/helpers/apk.py
with
28 additions
and
2 deletions
pmb/helpers/apk.py
+
28
−
2
View file @
641a4a8d
...
...
@@ -4,6 +4,7 @@ import os
import
shlex
from
collections.abc
import
Sequence
from
pathlib
import
Path
from
typing
import
overload
,
Literal
import
pmb.chroot
import
pmb.config.pmaports
...
...
@@ -20,10 +21,31 @@ from pmb.helpers import logging
from
pmb.meta
import
Cache
@overload
def
update_repository_list
(
root
:
Path
,
user_repository
:
Literal
[
False
],
for_chroot
:
Literal
[
False
],
mirrors_exclude
:
list
[
str
],
check
:
bool
,
)
->
None
:
...
@overload
def
update_repository_list
(
root
:
Path
,
user_repository
:
Literal
[
True
],
for_chroot
:
bool
,
mirrors_exclude
:
list
[
str
],
check
:
bool
,
)
->
None
:
...
@Cache
(
"
root
"
,
"
user_repository
"
,
mirrors_exclude
=
[])
def
update_repository_list
(
root
:
Path
,
user_repository
=
False
,
user_repository
:
bool
=
False
,
for_chroot
:
bool
=
False
,
mirrors_exclude
:
list
[
str
]
=
[],
check
=
False
,
):
...
...
@@ -68,7 +90,11 @@ def update_repository_list(
for
line
in
lines_new
:
pmb
.
helpers
.
run
.
root
([
"
sh
"
,
"
-c
"
,
"
echo
"
f
"
{
shlex
.
quote
(
line
)
}
>>
{
path
}
"
])
update_repository_list
(
root
,
user_repository
=
user_repository
,
mirrors_exclude
=
mirrors_exclude
,
check
=
True
root
,
user_repository
=
user_repository
,
for_chroot
=
for_chroot
,
mirrors_exclude
=
mirrors_exclude
,
check
=
True
,
)
...
...
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