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
d34e8d17
Unverified
Commit
d34e8d17
authored
7 years ago
by
Oliver Smith
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Upstream compatibility test: also test generated aports, e.g. gcc-armhf (#1014)
parent
12605e5e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_upstream_compatibility.py
+48
-0
48 additions, 0 deletions
test/test_upstream_compatibility.py
with
48 additions
and
0 deletions
test/test_upstream_compatibility.py
+
48
−
0
View file @
d34e8d17
...
...
@@ -74,3 +74,51 @@ def test_qt_versions(args):
pkgver_upstream
)
assert
[]
==
failed
def
test_aportgen_versions
(
args
):
"""
Verify that the packages generated by
'
pmbootstrap aportgen
'
have
the same version (pkgver *and* pkgrel!) as the upstream packages
they are based on.
"""
# Get Alpine's "main" repository APKINDEX path
pmb
.
helpers
.
repo
.
update
(
args
)
repository
=
args
.
mirror_alpine
+
args
.
alpine_version
+
"
/main
"
hash
=
pmb
.
helpers
.
repo
.
hash
(
repository
)
index_path
=
(
args
.
work
+
"
/cache_apk_armhf/APKINDEX.
"
+
hash
+
"
.tar.gz
"
)
# Alpine packages and patterns for our derivatives
map
=
{
"
binutils
"
:
"
binutils-*
"
,
"
busybox
"
:
"
busybox-static-*
"
,
"
gcc
"
:
"
gcc-*
"
,
"
musl
"
:
"
musl-*
"
}
# Iterate over Alpine packages
failed
=
[]
generated
=
"
# Automatically generated aport, do not edit!
"
for
pkgname
,
pattern
in
map
.
items
():
# Upstream version
index_data
=
pmb
.
parse
.
apkindex
.
read
(
args
,
pkgname
,
index_path
)
version_upstream
=
index_data
[
"
version
"
]
# Iterate over our packages
for
path
in
glob
.
glob
(
args
.
aports
+
"
/*/
"
+
pattern
+
"
/APKBUILD
"
):
# Skip non-aportgen APKBUILDs
with
open
(
path
)
as
handle
:
if
generated
not
in
handle
.
read
():
continue
# Compare the version
print
(
"
Checking
"
+
path
)
apkbuild
=
pmb
.
parse
.
apkbuild
(
args
,
path
)
version
=
apkbuild
[
"
pkgver
"
]
+
"
-r
"
+
apkbuild
[
"
pkgrel
"
]
if
version
!=
version_upstream
:
failed
.
append
(
apkbuild
[
"
pkgname
"
]
+
"
:
"
+
version
+
"
!=
"
+
version_upstream
+
"
(from
"
+
pkgname
+
"
)
"
)
continue
assert
[]
==
failed
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