[Piuparts-commits] [piuparts] 01/06: scripts/post-{install, purge}-exceptions: wait for dkms progress indicator to terminate
Holger Levsen
holger at layer-acht.org
Tue Dec 20 18:54:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit bd6fa06716203eb8598d4971ec668a8eb43c4942
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Dec 20 16:43:04 2016 +0100
scripts/post-{install,purge}-exceptions: wait for dkms progress indicator to terminate
there might be a leftover 'sleep' process from progress reporting
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
custom-scripts/scripts/post_install_exceptions | 18 ++++++++++++++++++
custom-scripts/scripts/post_purge_exceptions | 7 +++++++
debian/changelog | 2 ++
3 files changed, 27 insertions(+)
diff --git a/custom-scripts/scripts/post_install_exceptions b/custom-scripts/scripts/post_install_exceptions
index 5838018..58a6b64 100755
--- a/custom-scripts/scripts/post_install_exceptions
+++ b/custom-scripts/scripts/post_install_exceptions
@@ -5,6 +5,16 @@ log_debug() {
echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
}
+is_installed()
+{
+ local pkg="$1"
+ dpkg-query -s "$pkg" >/dev/null 2>&1 || return 1
+ local status="$(dpkg-query -W -f '${Status}' $pkg)"
+ test "$status" != "unknown ok not-installed" || return 1
+ test "$status" != "deinstall ok config-files" || return 1
+ return 0
+}
+
case ${PIUPARTS_OBJECTS%%=*} in
apt-listbugs) log_debug
# when installed apt-listbugs is run on installations / upgrades
@@ -16,3 +26,11 @@ case ${PIUPARTS_OBJECTS%%=*} in
ln -svf /bin/true /usr/sbin/apt-listbugs
;;
esac
+
+if is_installed dkms; then
+ # remember for post_purge_exceptions
+ touch /var/run/piuparts-stamp-dkms-installed
+ # if dkms built a kernel module, there might be a
+ # leftover 'sleep' process from progress reporting
+ sleep 3
+fi
diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions
index 7e6fb5e..448ff09 100755
--- a/custom-scripts/scripts/post_purge_exceptions
+++ b/custom-scripts/scripts/post_purge_exceptions
@@ -30,3 +30,10 @@ case ${PIUPARTS_OBJECTS%%=*} in
esac
;;
esac
+
+if [ -f /var/run/piuparts-stamp-dkms-installed ]; then
+ rm /var/run/piuparts-stamp-dkms-installed
+ # if dkms built a kernel module, there might be a
+ # leftover 'sleep' process from progress reporting
+ sleep 3
+fi
diff --git a/debian/changelog b/debian/changelog
index da37222..ce7d4d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ piuparts (0.74) UNRELEASED; urgency=medium
* piuparts-reports.py:
- Mark arch:all packages with an :all suffix in package lists.
* pre_install_database-server: Use default-mysql-* from stretch onwards.
+ * scripts/post-{install,purge}-exceptions: Wait for dkms progress indicator
+ to terminate.
* known_problems/debsums_mismatch_*.conf: Report missing symlinks and
directories.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list