debian/rules: Rewrite kernel check using "linux-version"

This is cleaner than using dpkg --compare-versions, although the difference
should be rather academic for this purpose.
This commit is contained in:
Martin Pitt 2015-11-19 12:46:18 +01:00
parent 57dc61d6b6
commit aa4c360aa0
2 changed files with 2 additions and 1 deletions

1
debian/control vendored
View File

@ -44,6 +44,7 @@ Build-Depends: debhelper (>= 9.20141010),
libmount-dev (>= 2.27.1),
libseccomp-dev (>= 2.2.1-2~) [amd64 arm64 armel armhf i386 mips mipsel mips64 mips64el x32],
libdw-dev (>= 0.158) <!stage1>,
linux-base <!nocheck>,
python3:native,
python3-lxml:native

2
debian/rules vendored
View File

@ -262,7 +262,7 @@ ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
env -u LD_PRELOAD make -C build-deb check || ( \
cd build-deb; \
for f in test-*.log; do echo "==== $$f ===="; cat $$f; done; \
if dpkg --compare-versions $$(uname -r) gt 3.13; then \
if linux-version compare "$$(uname -r)" ge 3.13; then \
exit 1; \
else \
echo "Ignoring test failure under too old kernel $$(uname -r)"; \