Commit graph

4 commits

Author SHA1 Message Date
Henrik Grimler
f25a8bf374
treewide: switch back to bootimg_qcdt{,_type}
In some refactoring work deviceinfo_bootimg_qcdt and
deviceinfo_bootimg_qcdt_type were accidentally renamed to just
deviceinfo_qcdt{,_type}. Change back to original name everywhere.

Among the notable changes is that we modify the bootimg header_v2 test
so that bootimg_qcdt="false" is acceptable in the deviceinfo. I am not
sure why it was added to the !expected substrings, we have plenty of
header_v2 devices with the property set.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmbootstrap/-/merge_requests/2628
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2628
2025-07-03 17:01:33 +02:00
Pablo Correa Gómez
7d36c604f1
test: add small test for argument parsing
This is just a small detail, but in some way CLI options are similar
to public API. I did this while trying some changes, even if in the
end the issue to solve was not in pmbootstrap, I thought it'd make
sense to contribute this.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2626
2025-06-15 10:25:30 +02:00
Pablo Correa Gómez
ba6bb4272d
pmb.parse.apkindex: account for provider_priority when locating packages
This fixes an issue where the local apk index has two packages in it
that provide the same thing, but this function was returning only the
one with the shortest name... which could be very bad :)

https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475#note_480167

In the process, add tests for pmb.parse.apkindex.package function. Some of
the tests would fail without this patch, surfacing a bug where priorities
are not considered, but should, and that we are now fixing.

Co-authored-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2594
2025-05-13 19:19:00 +02:00
Hugo Osvaldo Barrera
5a152aebae
test: move all tests into separate module (MR 2551)
When installing pmboostrap, all tests are installed alongside it. There
doesn't seem to be any way to selectively exclude some files inside
python modules, so move all test into a separate module instead.

This is the typical convention in python projects.

See: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79862
Fixes: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2541
2025-02-13 01:28:20 +01:00