From 6423a679825b40bfc500d49e15b0bafb9ee5ede7 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 21 Jan 2013 16:15:55 +0100 Subject: [PATCH] =?UTF-8?q?Handle=20module-init-tools=20=E2=86=92=20kmod?= =?UTF-8?q?=20transition=20in=20wheezy/raring=20gracefully?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 1 + hooks/common/80-install-modules-deb | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7389895..e46c5c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low - Makefile accepts DESTDIR=… - Move examples from debian/examples to examples. - Uses File::Which, added (build-) dependency on libfile-which-perl + - Knows about module-init-tools → kmod transition in wheezy/raring. * Add debian/gbp.conf to be able to to build xen-tools with git-buildpackage. * Clean up debian/rules: diff --git a/hooks/common/80-install-modules-deb b/hooks/common/80-install-modules-deb index 45905ff..2bc87fd 100755 --- a/hooks/common/80-install-modules-deb +++ b/hooks/common/80-install-modules-deb @@ -74,9 +74,17 @@ else fi # -# Install the module-init-tools package. +# Install either kmod or module-init-tools package. # -installDebianPackage ${prefix} module-init-tools +if chroot ${prefix} /usr/bin/apt-cache show module-init-tools >/dev/null 2>/dev/null; then + if chroot ${prefix} /usr/bin/apt-cache show module-init-tools | fgrep -qi transitional; then + installDebianPackage ${prefix} kmod + else + installDebianPackage ${prefix} module-init-tools + fi +else + installDebianPackage ${prefix} kmod +fi fi # if pygrub