main/devicepkg-utils: allow overriding root directory in source_deviceinfo

This can be used to source the deviceinfo of an arbitrary rootfs, not
just the current one. In particular, this will be used in the
boot-deploy CI.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7026>
This commit is contained in:
Stefan Hansson
2025-09-10 14:43:34 +00:00
committed by The Friendly Merge Bot
parent c3f0506216
commit d9c3fa80a8
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
pkgname=devicepkg-utils
pkgver=0.2.0
pkgrel=2
pkgver=0.3.0
pkgrel=0
pkgdesc="Utilities for interacting with device packages"
url="https://postmarketos.org"
arch="noarch"
@@ -21,5 +21,5 @@ package() {
}
sha512sums="
ef2181d7072b4ef62c11d3f50677fcd455e50cf89a3110e67fcaa6058ea695f101ded48b1442758494e3d23a97cdd93df6669656f329037020ba715af4341b55 etc-deviceinfo
a6e4f57280bed21fe3ac480eaa582c14fa8337d77386ff92c3e271818b5a028cac2a4f557ecfe9f7432e23a6dadd33bdc6b429a0e5e29cce2602b2a6e58a8bdd source_deviceinfo
b92a28574268c0e71db77309a288d81e2525922cb5043557566e0cfa5fc74986b630762d826eff08462a1506886be3fbfd9cefccd06e006af9b2dc4f89619650 source_deviceinfo
"
+2 -2
View File
@@ -1,6 +1,6 @@
# These scripts must be sourced (not executed) to work properly
# shellcheck disable=SC1091
[ -f /usr/share/deviceinfo/deviceinfo ] && . /usr/share/deviceinfo/deviceinfo
[ -f /etc/deviceinfo ] && . /etc/deviceinfo
[ -f "$SOURCE_DEVICEINFO_ROOT/usr/share/deviceinfo/deviceinfo" ] && . "$SOURCE_DEVICEINFO_ROOT/usr/share/deviceinfo/deviceinfo"
[ -f "$SOURCE_DEVICEINFO_ROOT/etc/deviceinfo" ] && . "$SOURCE_DEVICEINFO_ROOT/etc/deviceinfo"
[ -z "$deviceinfo_arch" ] && { echo "$0: ERROR: deviceinfo file is missing!!"; exit 1; } || true