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
4c0f3467
Unverified
Commit
4c0f3467
authored
5 months ago
by
Newbyte
Browse files
Options
Downloads
Patches
Plain Diff
pmb: Migrate aportgen to Command (MR 2428)
parent
b1b6c52b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2428
pmb: Migrate aportgen to Command
Pipeline
#208092
failed
5 months ago
Stage: lint
Stage: deploy
Stage: test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pmb/commands/__init__.py
+3
-1
3 additions, 1 deletion
pmb/commands/__init__.py
pmb/commands/aportgen.py
+18
-0
18 additions, 0 deletions
pmb/commands/aportgen.py
pmb/helpers/frontend.py
+0
-6
0 additions, 6 deletions
pmb/helpers/frontend.py
with
21 additions
and
7 deletions
pmb/commands/__init__.py
+
3
−
1
View file @
4c0f3467
...
...
@@ -10,6 +10,7 @@ from pmb.types import PmbArgs
from
pmb.helpers
import
frontend
from
.base
import
Command
from
.aportgen
import
Aportgen
from
.log
import
Log
from
.index
import
Index
from
.repo_bootstrap
import
RepoBootstrap
...
...
@@ -46,7 +47,6 @@ unmigrated_commands = [
"
chroot
"
,
"
install
"
,
"
checksum
"
,
"
aportgen
"
,
"
build
"
,
"
deviceinfo_parse
"
,
"
apkbuild_parse
"
,
...
...
@@ -64,6 +64,8 @@ def run_command(args: PmbArgs):
command
:
Command
match
args
.
action
:
case
"
aportgen
"
:
command
=
Aportgen
(
args
.
packages
,
args
.
fork_alpine
)
case
"
log
"
:
command
=
Log
(
args
.
clear_log
,
args
.
lines
)
case
"
index
"
:
...
...
This diff is collapsed.
Click to expand it.
pmb/commands/aportgen.py
0 → 100644
+
18
−
0
View file @
4c0f3467
# Copyright 2024 Stefan Hansson
# SPDX-License-Identifier: GPL-3.0-or-later
from
__future__
import
annotations
import
pmb.aportgen
from
pmb
import
commands
from
pmb.helpers
import
logging
class
Aportgen
(
commands
.
Command
):
def
__init__
(
self
,
package_list
:
list
[
str
],
fork_alpine
:
bool
)
->
None
:
self
.
package_list
=
package_list
self
.
fork_alpine
=
fork_alpine
def
run
(
self
)
->
None
:
for
package
in
self
.
package_list
:
logging
.
info
(
f
"
Generate aport:
{
package
}
"
)
pmb
.
aportgen
.
generate
(
package
,
self
.
fork_alpine
)
This diff is collapsed.
Click to expand it.
pmb/helpers/frontend.py
+
0
−
6
View file @
4c0f3467
...
...
@@ -102,12 +102,6 @@ def _install_ondev_verify_no_rootfs(device: str, ondev_cp: list[tuple[str, str]]
)
def
aportgen
(
args
:
PmbArgs
)
->
None
:
for
package
in
args
.
packages
:
logging
.
info
(
"
Generate aport:
"
+
package
)
pmb
.
aportgen
.
generate
(
package
,
args
.
fork_alpine
)
def
build
(
args
:
PmbArgs
)
->
None
:
# Strict mode: zap everything
if
args
.
strict
:
...
...
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