aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-14 17:35:57 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-14 17:35:57 -0400
commit8de8e6433515a071b780d927b50035ca46fbd030 (patch)
treed5acf3ff3e4731988070df563f46bdfdbbf86659
parentd186e219b63d9f023d0f7718b3a30162b2a87721 (diff)
downloadsbo-maintainer-tools-8de8e6433515a071b780d927b50035ca46fbd030.tar.gz
sbopkglint: add check for broken python modules.
-rw-r--r--sbopkglint.d/65-python.t.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/sbopkglint.d/65-python.t.sh b/sbopkglint.d/65-python.t.sh
new file mode 100644
index 0000000..5c81d43
--- /dev/null
+++ b/sbopkglint.d/65-python.t.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# sbopkglint test, must be sourced by sbopkglint (not run standalone).
+
+# PKG, PRGNAM, VERSION, ARCH are set by sbopkglint. also the current
+# directory is the root of the installed package tree.
+
+#######################################################################
+# check for badly-built python packages that end up named UNKNOWN.
+# at some point there will probably be more python checks added here.
+
+find usr/lib*/python* -type d -a -name 'UNKNOWN*' 2>/dev/null > .badpython.$$
+if [ -s .badpython.$$ ]; then
+ warn "invalid/broken Python module(s): $(cat .badpython.$$)"
+fi
+rm -f .badpython.$$