#!/bin/sh set -e TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' insertpackage 'unstable' 'module-init-tools' 'amd64' '1.0' 'Depends: libkmod2 (= 21-1)' insertpackage 'unstable' 'libkmod2' 'amd64' '0.22-1' insertinstalledpackage 'module-init-tools' 'amd64' '0.1' setupaptarchive # this test only works if the python-apt is build against the same # ABI version as the apt we are testing here PYAPT_LIB_VER=$(runpython3 -c 'import apt_pkg;print(apt_pkg.LIB_VERSION)' 2>/dev/null || true) if [ ! -f $LIBRARYPATH/libapt-pkg.so.$PYAPT_LIB_VER ]; then msgskip "python-apt build with the wrong library version: $PYAPT_LIB_VER" exit 0 fi # we can not test this using our normal sh tests cat > test.py <