diff -u scrollkeeper-0.3.14/debian/changelog scrollkeeper-0.3.14/debian/changelog --- scrollkeeper-0.3.14/debian/changelog +++ scrollkeeper-0.3.14/debian/changelog @@ -1,3 +1,10 @@ +scrollkeeper (0.3.14-15ubuntu2~ilm0) hardy; urgency=low + + * Wrap scrollkeeper-update in a script that arms a dpkg trigger if + called by a dpkg maintainer script with -q as the only option. + + -- Dagfinn Ilmari Mannsåker Fri, 28 Mar 2008 04:26:32 +0000 + scrollkeeper (0.3.14-15ubuntu1) hardy; urgency=low * Merge with Debian; remaining changes: diff -u scrollkeeper-0.3.14/debian/control.in scrollkeeper-0.3.14/debian/control.in --- scrollkeeper-0.3.14/debian/control.in +++ scrollkeeper-0.3.14/debian/control.in @@ -6,7 +6,7 @@ Uploaders: @GNOME_TEAM@ Standards-Version: 3.7.2 Build-Depends: cdbs, - debhelper (>= 5), + debhelper (>= 5.0.59), libxml2-dev (>= 2.4.16), intltool (>= 0.28-2), zlib1g-dev (>= 1.1.3-12), diff -u scrollkeeper-0.3.14/debian/rules scrollkeeper-0.3.14/debian/rules --- scrollkeeper-0.3.14/debian/rules +++ scrollkeeper-0.3.14/debian/rules @@ -29,6 +29,8 @@ dh_link -plibscrollkeeper-dev usr/share/doc/libscrollkeeper0 usr/share/doc/libscrollkeeper-dev binary-post-install/scrollkeeper:: + mv debian/scrollkeeper/usr/bin/scrollkeeper-update debian/scrollkeeper/usr/bin/scrollkeeper-update.real + cp debian/scrollkeeper-update.wrapper debian/scrollkeeper/usr/bin/scrollkeeper-update dh_installxmlcatalogs -pscrollkeeper # (cd debian/scrollkeeper && fdupes -rnq usr) \ diff -u scrollkeeper-0.3.14/debian/scrollkeeper.postinst scrollkeeper-0.3.14/debian/scrollkeeper.postinst --- scrollkeeper-0.3.14/debian/scrollkeeper.postinst +++ scrollkeeper-0.3.14/debian/scrollkeeper.postinst @@ -9,5 +9,14 @@ +# scrollkeeper-rebuilddb calls scrollkeeper-update with more options +# than -q, so it doesn't arm the trigger, but rather safe than sorry +SCROLLKEEPER_UPDATE_NOTRIGGER=y +export SCROLLKEEPER_UPDATE_NOTRIGGER + if [ "$1" = "configure" ]; then printf "Rebuilding the database. This may take some time.\n" scrollkeeper-rebuilddb -q fi +if [ "$1" = "triggered" ]; then + printf "scrollkeeper-update deferred processing now taking place.\n" + scrollkeeper-update -q >/dev/null 2>&1 +fi diff -u scrollkeeper-0.3.14/debian/control scrollkeeper-0.3.14/debian/control --- scrollkeeper-0.3.14/debian/control +++ scrollkeeper-0.3.14/debian/control @@ -6,7 +6,7 @@ Uploaders: Debian GNOME Maintainers , Gustavo Noronha Silva , Loic Minier Standards-Version: 3.7.2 Build-Depends: cdbs, - debhelper (>= 5), + debhelper (>= 5.0.59), libxml2-dev (>= 2.4.16), intltool (>= 0.28-2), zlib1g-dev (>= 1.1.3-12), only in patch2: unchanged: --- scrollkeeper-0.3.14.orig/debian/scrollkeeper-update.wrapper +++ scrollkeeper-0.3.14/debian/scrollkeeper-update.wrapper @@ -0,0 +1,17 @@ +#!/bin/sh + +if test $# = 1 && test "$1" = "-q" \ + && test -z "$SCROLLKEEPER_UPDATE_NOTRIGGER" \ + && test "$DPKG_MAINTSCRIPT_PACKAGE" \ + && dpkg-trigger --check-supported 2>/dev/null \ + && dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~' +then + if dpkg-trigger --no-await scrollkeeper-update; then + echo "scrollkeeper-update: deferring update (trigger activated)" + exit 0 + fi +fi + +exec /usr/bin/scrollkeeper-update.real "$@" + + only in patch2: unchanged: --- scrollkeeper-0.3.14.orig/debian/scrollkeeper.triggers +++ scrollkeeper-0.3.14/debian/scrollkeeper.triggers @@ -0,0 +1 @@ +interest scrollkeeper-update