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
5edabd4d
Commit
5edabd4d
authored
6 years ago
by
George Hopkins
Committed by
Oliver Smith
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
pmbootstrap: handle checkdepends (#1533)
parent
30706a07
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pmb/build/_package.py
+2
-0
2 additions, 0 deletions
pmb/build/_package.py
pmb/config/__init__.py
+1
-0
1 addition, 0 deletions
pmb/config/__init__.py
test/test_build_package.py
+7
-7
7 additions, 7 deletions
test/test_build_package.py
with
10 additions
and
7 deletions
pmb/build/_package.py
+
2
−
0
View file @
5edabd4d
...
...
@@ -97,6 +97,8 @@ def get_depends(args, apkbuild):
"""
# Read makedepends and depends
ret
=
list
(
apkbuild
[
"
makedepends
"
])
if
"
!check
"
not
in
apkbuild
[
"
options
"
]:
ret
+=
apkbuild
[
"
checkdepends
"
]
if
"
ignore_depends
"
not
in
args
or
not
args
.
ignore_depends
:
ret
+=
apkbuild
[
"
depends
"
]
ret
=
sorted
(
set
(
ret
))
...
...
This diff is collapsed.
Click to expand it.
pmb/config/__init__.py
+
1
−
0
View file @
5edabd4d
...
...
@@ -190,6 +190,7 @@ apkbuild_attributes = {
"
depends
"
:
{
"
array
"
:
True
},
"
depends_dev
"
:
{
"
array
"
:
True
},
"
makedepends
"
:
{
"
array
"
:
True
},
"
checkdepends
"
:
{
"
array
"
:
True
},
"
options
"
:
{
"
array
"
:
True
},
"
pkgname
"
:
{
"
array
"
:
False
},
"
pkgdesc
"
:
{
"
array
"
:
False
},
...
...
This diff is collapsed.
Click to expand it.
test/test_build_package.py
+
7
−
7
View file @
5edabd4d
...
...
@@ -124,34 +124,34 @@ def test_check_arch(args):
def
test_get_depends
(
monkeypatch
):
func
=
pmb
.
build
.
_package
.
get_depends
apkbuild
=
{
"
pkgname
"
:
"
test
"
,
"
depends
"
:
[
"
a
"
],
"
makedepends
"
:
[
"
c
"
,
"
b
"
],
"
subpackages
"
:
[
"
d
"
]}
"
checkdepends
"
:
"
e
"
,
"
subpackages
"
:
[
"
d
"
]
,
"
options
"
:
[]
}
# Depends + makedepends
args
=
args_patched
(
monkeypatch
,
[
"
pmbootstrap
"
,
"
build
"
,
"
test
"
])
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
]
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
,
"
e
"
]
args
=
args_patched
(
monkeypatch
,
[
"
pmbootstrap
"
,
"
install
"
])
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
]
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
,
"
e
"
]
# Ignore depends (-i)
args
=
args_patched
(
monkeypatch
,
[
"
pmbootstrap
"
,
"
build
"
,
"
-i
"
,
"
test
"
])
assert
func
(
args
,
apkbuild
)
==
[
"
b
"
,
"
c
"
]
assert
func
(
args
,
apkbuild
)
==
[
"
b
"
,
"
c
"
,
"
e
"
]
# Package depends on its own subpackage
apkbuild
[
"
makedepends
"
]
=
[
"
d
"
]
args
=
args_patched
(
monkeypatch
,
[
"
pmbootstrap
"
,
"
build
"
,
"
test
"
])
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
]
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
e
"
]
# Package depends on itself
apkbuild
[
"
makedepends
"
]
=
[
"
c
"
,
"
b
"
,
"
test
"
]
args
=
args_patched
(
monkeypatch
,
[
"
pmbootstrap
"
,
"
build
"
,
"
test
"
])
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
]
assert
func
(
args
,
apkbuild
)
==
[
"
a
"
,
"
b
"
,
"
c
"
,
"
e
"
]
def
test_build_depends
(
args
,
monkeypatch
):
# Shortcut and fake apkbuild
func
=
pmb
.
build
.
_package
.
build_depends
apkbuild
=
{
"
pkgname
"
:
"
test
"
,
"
depends
"
:
[
"
a
"
],
"
makedepends
"
:
[
"
b
"
],
"
subpackages
"
:
[
"
d
"
]}
"
checkdepends
"
:
[],
"
subpackages
"
:
[
"
d
"
]
,
"
options
"
:
[]
}
# No depends built (first makedepends + depends, then only makedepends)
monkeypatch
.
setattr
(
pmb
.
build
.
_package
,
"
package
"
,
return_none
)
...
...
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