diff -u kio-umountwrapper-0.2/debian/preinst kio-umountwrapper-0.2/debian/preinst --- kio-umountwrapper-0.2/debian/preinst +++ kio-umountwrapper-0.2/debian/preinst @@ -22,6 +22,10 @@ package_name=kio-umountwrapper +# make sure than the directories exist before running dpkg-divert +mkdir -p /usr/share/apps/konqueror/servicemenus/ +mkdir -p /usr/share/apps/d3lphin/servicemenus/ + case "$1" in install) dpkg-divert --package $package_name \ diff -u kio-umountwrapper-0.2/debian/changelog kio-umountwrapper-0.2/debian/changelog --- kio-umountwrapper-0.2/debian/changelog +++ kio-umountwrapper-0.2/debian/changelog @@ -1,3 +1,10 @@ +kio-umountwrapper (0.2-0ubuntu7) intrepid; urgency=low + + * debian/preinst, debian/postrm: make sure than the directories used by + dpkg-divert exist + + -- Gauvain Pocentek Sun, 29 Jun 2008 11:06:10 +0200 + kio-umountwrapper (0.2-0ubuntu6) hardy; urgency=low * Update from Jan Klötzke to also support encrypted removable drives diff -u kio-umountwrapper-0.2/debian/postrm kio-umountwrapper-0.2/debian/postrm --- kio-umountwrapper-0.2/debian/postrm +++ kio-umountwrapper-0.2/debian/postrm @@ -21,6 +21,10 @@ package_name=kio-umountwrapper +# make sure than the directories exist before running dpkg-divert +mkdir -p /usr/share/apps/konqueror/servicemenus/ +mkdir -p /usr/share/apps/d3lphin/servicemenus/ + case "$1" in remove) dpkg-divert --package $package_name --rename --remove \ @@ -33,6 +37,10 @@ /usr/share/apps/d3lphin/servicemenus/media_safelyremove.desktop ;; + # try to remove the dirs we've created for pkg-divert + rmdir --ignore-fail-on-non-empty /usr/share/apps/konqueror/servicemenus/ + rmdir --ignore-fail-on-non-empty /usr/share/apps/d3lphin/servicemenus/ + upgrade) exit 0 ;;