omarchy-ane-dkms: check() passes on kernels with the in-tree ANE driver
dkms.conf sets BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE", so on a kernel that ships the in-tree driver "dkms build" exits 77 and builds nothing. check() treated that as a failure, and makepkg stopped in check(). check() now takes exit 77 as "no DKMS build" when the kernel's config sets CONFIG_DRM_ACCEL_ANE, and prints it. After a build it lists ane.ko and ane_t6021.ko from the DKMS tree. Every other dkms exit status still fails check().
This commit is contained in:
1 parent
7980d7b199
commit
5ef9ebdcac
1 file changed
+12
-1
@@ -58,7 +58,18 @@ check() {
|
||||
mkdir -p "$srcdir/check/dkms" "$srcdir/check/src"
|
||||
local dkms_options=(--dkmstree "$srcdir/check/dkms" --sourcetree "$srcdir/check/src" -k "$kver")
|
||||
fakeroot dkms "${dkms_options[@]}" add "$srcdir/dkms/$_srcname-$pkgver"
|
||||
fakeroot dkms "${dkms_options[@]}" build "$_srcname/$pkgver"
|
||||
local rc=0
|
||||
fakeroot dkms "${dkms_options[@]}" build "$_srcname/$pkgver" || rc=$?
|
||||
case $rc in
|
||||
0) ls "$srcdir/check/dkms/$_srcname/$pkgver/$kver"/*/module/{ane,ane_t6021}.ko* ;;
|
||||
77)
|
||||
# dkms.conf BUILD_EXCLUSIVE_CONFIG="!CONFIG_DRM_ACCEL_ANE": a kernel that
|
||||
# ships the in-tree ANE driver keeps its own modules.
|
||||
grep -qs '^CONFIG_DRM_ACCEL_ANE=[ym]' "${build[0]}"/{include/config/auto.conf,.config} ||
|
||||
{ echo "check: dkms skipped $kver, which has no CONFIG_DRM_ACCEL_ANE" >&2; return 1; }
|
||||
echo "check: no DKMS build: $kver ships the in-tree ANE driver (CONFIG_DRM_ACCEL_ANE)" ;;
|
||||
*) return "$rc" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
package() {
|
||||
|
||||
Reference in new issue
Block a user