[SCM] Phonon Multimedia Framework packaging branch, master, updated. debian/4.6.0really4.4.3-1-27-gcdc8ae0
Modestas Vainius
modax at alioth.debian.org
Sun Feb 27 00:08:45 UTC 2011
The following commit has been merged in the master branch:
commit 217967794c7d179340304c58d85a4b29caeeba9e
Author: Modestas Vainius <modestas at vainius.eu>
Date: Sun Feb 27 00:59:09 2011 +0200
Use debconf Owners field to check if both packages are installed.
This should be faster but it could be a bit more error-prone. We will see how
it goes.
---
debian/phonon-backend-null.dc-postinst.in | 32 ++++++----------------------
debian/phonon-backend-null.postrm | 1 +
2 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/debian/phonon-backend-null.dc-postinst.in b/debian/phonon-backend-null.dc-postinst.in
index dcfa1fc..6322618 100644
--- a/debian/phonon-backend-null.dc-postinst.in
+++ b/debian/phonon-backend-null.dc-postinst.in
@@ -2,11 +2,6 @@
. /usr/share/debconf/confmodule
-query_package_status()
-{
- dpkg-query -W -f'${Status}\n' "$1" | cut -d' ' -f3
-}
-
# This function will show a warning about phonon-backend-null whenever phonon
# metapackage or phonon-backend-null is being installed
warn_about_phonon_backend_null()
@@ -22,26 +17,13 @@ warn_about_phonon_backend_null()
fi
if [ "$1" = "configure" ]; then
- case "$package" in
- # In case the phonon metapackage is being installed, display the
- # warning only if phonon-backend-null is already installed.
- phonon)
- if [ "`query_package_status phonon-backend-null`" = "installed" ]; then
- show_warning=1
- fi
- ;;
- # If null backend is being installed, show the warning only if
- # phonon metapackage is already installed
- phonon-backend-null)
- if [ "`query_package_status phonon`" = "installed" ]; then
- show_warning=1
- fi
- ;;
- *)
- echo "warn_about_phonon_backend_null: unsupported package: $package" >&2
- exit 10
- ;;
- esac
+ # Display the warning only if both (phonon and phonon-backend-null)
+ # are (about to be) installed. In order to avoid checking dpkg status
+ # database, we can check Owners field of the debconf question.
+ db_metaget phonon-backend-null/isnt_functional Owners
+ if [ "${RET#*,}" != "$RET" ]; then
+ show_warning=1
+ fi
# Finally show the note if needed (and it wasn't seen already)
db_fget phonon-backend-null/isnt_functional seen || true
diff --git a/debian/phonon-backend-null.postrm b/debian/phonon-backend-null.postrm
index b896593..d7df7e5 100644
--- a/debian/phonon-backend-null.postrm
+++ b/debian/phonon-backend-null.postrm
@@ -10,6 +10,7 @@ case "$1" in
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
db_fset phonon-backend-null/isnt_functional seen false || true
+ db_unregister phonon-backend-null/isnt_functional || true
fi
;;
esac
--
Phonon Multimedia Framework packaging
More information about the pkg-kde-commits
mailing list