Commit graph

8 commits

Author SHA1 Message Date
Newbyte
871a3128d8
docs, pmb: Add missing copyright headers (MR 2516)
I tried my best to get the right author based on git commit history, but
in the case of code being moved from one file to make another I might
have gotten something wrong.
2025-01-02 16:45:03 +01:00
Newbyte
0752a202aa
pmb.core.arch: Handle unsupported arches in from_machine_type() better (MR 2498)
Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2501
2024-11-29 10:43:09 +01:00
Jens Reidel
13d8154373
core: arch: Add ppc64le qemu mapping (MR 2476)
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-11-25 14:26:59 +01:00
Jens Reidel
4b4ba1e6ec
core: arch: Add ppc64le as a supported architecture (MR 2476)
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-11-25 13:08:50 +01:00
Jens Reidel
6d72043ac2
tests: Assert that riscv64 is supported (MR 2476)
riscv64 is supported but currently not covered by the arch test suite.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-11-25 13:08:50 +01:00
Clayton Craft
c7a97df79a
pmb.core.arch: add noarch (MR 2446)
When a `noarch` APKBUILD is changed in local pmaports, `pmb install`
will build it automatically but image creation will fail with the
following error:

```
$ pmbootstrap install
...
[12:00:43] Build is necessary for package 'postmarketos-base-ui': binary package out of date (binary: 28-r6, local pmaports: 29-r0)
[12:00:48] => edge/postmarketos-base-ui: Done!
...
[12:01:02] (rootfs_lenovo-21bx) % apk --no-progress --repository /home/clayton/.local/var/pmbootstrap/packages/edge add -u --virtual .pmbootstrap /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-wifi-iwd-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-qt-wayland-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-qt-tweaks-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-audio-none-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-networkmanager-29-r0.apk /mnt/pmbootstrap/packages/edge/aarch64/postmarketos-base-ui-wifi-iwd-29-r0.apk --no-interactive
...
[12:01:04] ERROR: Invalid architecture: 'noarch', expected something like: x86_64, aarch64, riscv64, armhf, x86, armv7
[12:01:04] See also: <https://postmarketos.org/troubleshooting>
[12:01:04] Traceback (most recent call last):
  File "/home/clayton/src/pmbootstrap/pmb/core/arch.py", line 42, in from_str
    return Arch(arch)
           ^^^^^^^^^^
  File "/usr/lib/python3.12/enum.py", line 757, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/enum.py", line 1171, in __new__
    raise ve_exc
ValueError: 'noarch' is not a valid Arch

```

[caleb: fixed tests]
2024-10-21 21:41:16 +02:00
Hugo Osvaldo Barrera
e421bb2d41
Auto-format codebase with ruff (MR 2325)
See: https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2324
Closes: https://gitlab.com/postmarketOS/pmbootstrap/-/merge_requests/2278
2024-06-23 15:40:13 +02:00
Caleb Connolly
ca722b499e
tests: add tests for Arch and Chroot types (MR 2252)
Add some exhaustive unit testing to validate that these types behave as
expected.

And fix a few bugs uncovered by the tests.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-23 12:38:41 +02:00