From e9355891541f5d5a5f8b92f22e10b7be4cd66fa9 Mon Sep 17 00:00:00 2001 From: Josselin Mouette Date: Fri, 13 Jul 2007 23:31:36 +0000 Subject: [PATCH] * Move manual pages of binaries in /usr/sbin to section 8. * update-icon-caches: new script, updates the icon caches in a given list of directories. It is meant to be used by packages shipping icons, in the postinst/postrm. For transition purposes, icon caches are currently updated but not created if they don't already exist. * Install this script and its manual page in libgtk2.0-bin. --- debian/changelog | 12 ++++++++- debian/libgtk2.0-bin.install.in | 1 + debian/libgtk2.0-bin.manpages | 7 ++--- ...f-loaders.1 => update-gdkpixbuf-loaders.8} | 2 +- ...gtk-immodules.1 => update-gtk-immodules.8} | 2 +- ...modules.fr.1 => update-gtk-immodules.fr.8} | 2 +- debian/update-icon-caches | 26 +++++++++++++++++++ debian/update-icon-caches.8 | 19 ++++++++++++++ 8 files changed, 64 insertions(+), 7 deletions(-) rename debian/{update-gdkpixbuf-loaders.1 => update-gdkpixbuf-loaders.8} (96%) rename debian/{update-gtk-immodules.1 => update-gtk-immodules.8} (96%) rename debian/{update-gtk-immodules.fr.1 => update-gtk-immodules.fr.8} (96%) create mode 100644 debian/update-icon-caches create mode 100644 debian/update-icon-caches.8 diff --git a/debian/changelog b/debian/changelog index 3379651b5a..e8c36b34e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,19 @@ gtk+2.0 (2.11.5-2) UNRELEASED; urgency=low + [ Loic Minier ] * Don't run the directfb testsuite on kfreebsd as it hangs; proposed patch by Petr Salinger; closes: #431477. - -- Loic Minier Tue, 03 Jul 2007 18:59:23 +0200 + [ Josselin Mouette ] + * Move manual pages of binaries in /usr/sbin to section 8. + * update-icon-caches: new script, updates the icon caches in a given + list of directories. It is meant to be used by packages shipping + icons, in the postinst/postrm. + For transition purposes, icon caches are currently updated but not + created if they don't already exist. + * Install this script and its manual page in libgtk2.0-bin. + + -- Josselin Mouette Sat, 14 Jul 2007 01:31:16 +0200 gtk+2.0 (2.11.5-1) experimental; urgency=low diff --git a/debian/libgtk2.0-bin.install.in b/debian/libgtk2.0-bin.install.in index 037751bcd6..27a2e957c3 100644 --- a/debian/libgtk2.0-bin.install.in +++ b/debian/libgtk2.0-bin.install.in @@ -2,3 +2,4 @@ debian/install/shared/usr/share/man/man1/gtk-update-icon-cache.1 usr/share/man/man1 debian/install/shared/usr/share/man/man1/gtk-query-immodules-@APIVER@.1 usr/share/man/man1 debian/install/shared/usr/share/man/man1/gdk-pixbuf-query-loaders.1 usr/share/man/man1 +debian/update-icon-caches usr/sbin diff --git a/debian/libgtk2.0-bin.manpages b/debian/libgtk2.0-bin.manpages index 1dcd33c4c3..784e3e5815 100644 --- a/debian/libgtk2.0-bin.manpages +++ b/debian/libgtk2.0-bin.manpages @@ -1,4 +1,5 @@ debian/gtk-options.7 -debian/update-gtk-immodules.1 -debian/update-gtk-immodules.fr.1 -debian/update-gdkpixbuf-loaders.1 +debian/update-gtk-immodules.8 +debian/update-gtk-immodules.fr.8 +debian/update-gdkpixbuf-loaders.8 +debian/update-icon-caches.8 diff --git a/debian/update-gdkpixbuf-loaders.1 b/debian/update-gdkpixbuf-loaders.8 similarity index 96% rename from debian/update-gdkpixbuf-loaders.1 rename to debian/update-gdkpixbuf-loaders.8 index d40922d577..e3c17ff6f1 100644 --- a/debian/update-gdkpixbuf-loaders.1 +++ b/debian/update-gdkpixbuf-loaders.8 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH UPDATE-GDKPIXBUF-LOADERS 1 "6 January 2003" +.TH UPDATE-GDKPIXBUF-LOADERS 8 "6 January 2003" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff --git a/debian/update-gtk-immodules.1 b/debian/update-gtk-immodules.8 similarity index 96% rename from debian/update-gtk-immodules.1 rename to debian/update-gtk-immodules.8 index b16be98c92..9109bf23f8 100644 --- a/debian/update-gtk-immodules.1 +++ b/debian/update-gtk-immodules.8 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH UPDATE-GTK-IMMODULES 1 "13 March 2002" +.TH UPDATE-GTK-IMMODULES 8 "13 March 2002" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff --git a/debian/update-gtk-immodules.fr.1 b/debian/update-gtk-immodules.fr.8 similarity index 96% rename from debian/update-gtk-immodules.fr.1 rename to debian/update-gtk-immodules.fr.8 index b157bbb173..c3eea94e03 100644 --- a/debian/update-gtk-immodules.fr.1 +++ b/debian/update-gtk-immodules.fr.8 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH UPDATE-GTK-IMMODULES 1 "13 mars 2002" +.TH UPDATE-GTK-IMMODULES 8 "13 mars 2002" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff --git a/debian/update-icon-caches b/debian/update-icon-caches new file mode 100644 index 0000000000..8abe1ae98f --- /dev/null +++ b/debian/update-icon-caches @@ -0,0 +1,26 @@ +#! /bin/sh +set -e + +case "$1" in + ""|-h|--help) + echo "Usage: $0 directory [ ... ]" + exit 1 + ;; +esac + +for dir in "$@"; do + if [ ! -d "$dir" ]; then + echo "$dir is not a directory" + exit 2 + fi + if [ -f "$dir"/index.theme ]; then + if [ -f "$dir"/icon-theme.cache ]; then + # The cache already exists, regenerate it + gtk-update-icon-cache --force --quiet "$dir" + fi + else + # No more index.theme, remove the cache if it exists + rm -f "$dir"/icon-theme.cache + rmdir -p --ignore-fail-on-non-empty "$dir" + fi +done diff --git a/debian/update-icon-caches.8 b/debian/update-icon-caches.8 new file mode 100644 index 0000000000..03105e7c6a --- /dev/null +++ b/debian/update-icon-caches.8 @@ -0,0 +1,19 @@ +.TH UPDATE-ICON-CACHES 8 "13 July 2007" +.SH NAME +update-icon-caches \- Update wrapper script for the icon caches +.SH SYNOPSIS +\fBupdate-icon-caches\fP \fIdirectory\fP [ \fI...\fP ] +.SH DESCRIPTION +\fBupdate-icon-caches\fP is a wrapper script for updating the icon +caches in a list of directories. +.P +In each of the directories passed as arguments, the icon cache is +updated if it is already present. It is not created if it does not +already exist. +.P +If the theme index file is not present, the icon cache is removed. +.SH SEE ALSO +.BR gtk-update-icon-cache (1) +.SH AUTHOR +This manual page was written by Josselin Mouette , +for the Debian GNU/Linux system.