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
cb8a3a7e
Commit
cb8a3a7e
authored
3 years ago
by
Anri Dellal
Browse files
Options
Downloads
Patches
Plain Diff
Move code for getting required kernel options in separate function
parent
19a3ad15
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/parse/kconfig.py
+16
-7
16 additions, 7 deletions
pmb/parse/kconfig.py
with
16 additions
and
7 deletions
pmb/parse/kconfig.py
+
16
−
7
View file @
cb8a3a7e
...
...
@@ -96,6 +96,19 @@ def check_config_options_set(config, config_path_pretty, config_arch, options,
# Loop through necessary config options, and print a warning,
# if any is missing
ret
=
True
options
=
get_required_options
(
options
,
pkgver
)
logging
.
info
(
options
)
for
option
,
option_value
in
options
.
items
():
if
not
check_option
(
component
,
details
,
config
,
config_path_pretty
,
option
,
option_value
):
ret
=
False
if
not
details
:
break
# do not give too much error messages
return
ret
def
get_required_options
(
options
,
pkgver
,
config_arch
):
for
rules
,
archs_options
in
options
.
items
():
# Skip options irrelevant for the current kernel's version
# Example rules: ">=4.0 <5.0"
...
...
@@ -116,13 +129,7 @@ def check_config_options_set(config, config_path_pretty, config_arch, options,
if
config_arch
not
in
architectures
:
continue
for
option
,
option_value
in
options
.
items
():
if
not
check_option
(
component
,
details
,
config
,
config_path_pretty
,
option
,
option_value
):
ret
=
False
if
not
details
:
break
# do not give too much error messages
return
ret
return
options
def
check
(
args
,
pkgname
,
force_anbox_check
=
False
,
force_nftables_check
=
False
,
...
...
@@ -179,6 +186,8 @@ def check(args, pkgname, force_anbox_check=False, force_nftables_check=False,
diff_name
=
f
"
{
fragment
}
.
{
arch
}
"
pmb
.
chroot
.
user
(
args
,
[
"
cp
"
,
"
.config
"
,
f
"
/tmp/
{
diff_name
}
"
],
"
native
"
,
outputdir
)
pmb
.
chroot
.
user
(
args
,
[
"
abuild
"
,
"
clean
"
],
"
native
"
,
"
/home/pmos/build
"
)
paths
+=
[
f
"
{
args
.
work
}
/chroot_native/tmp/
{
diff_name
}
"
]
else
:
paths
=
glob
.
glob
(
f
"
{
aport
}
/config-*
"
)
...
...
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