Split gtk-update-icon-cache utility out of libgtk-3-bin into a separate

package called gtk-update-icon-cache to break a dependency cycle with
adwaita-icon-theme when building the package. (Closes: #747392)
As the gtk-update-icon-cache binary doesn't actually have any libgtk-3-0
dependency, there is no longer a reason to ship a gtk2 and gtk3 variant.
So from now on we will only ship one implementation built from src:gtk+3.0
and drop the Debian specific -3.0 suffix. To simplify the transition make
libgtk-3-bin depend on gtk-update-icon-cache. Once all theme packages have
been updated, this dependency can be dropped.
This commit is contained in:
Michael Biebl 2016-05-22 06:52:15 +00:00
parent 6536a43626
commit e447da62bd
12 changed files with 63 additions and 46 deletions

14
debian/changelog vendored
View File

@ -1,3 +1,17 @@
gtk+3.0 (3.20.5-2) UNRELEASED; urgency=medium
* Split gtk-update-icon-cache utility out of libgtk-3-bin into a separate
package called gtk-update-icon-cache to break a dependency cycle with
adwaita-icon-theme when building the package. (Closes: #747392)
As the gtk-update-icon-cache binary doesn't actually have any libgtk-3-0
dependency, there is no longer a reason to ship a gtk2 and gtk3 variant.
So from now on we will only ship one implementation built from src:gtk+3.0
and drop the Debian specific -3.0 suffix. To simplify the transition make
libgtk-3-bin depend on gtk-update-icon-cache. Once all theme packages have
been updated, this dependency can be dropped.
-- Michael Biebl <biebl@debian.org> Sun, 22 May 2016 08:31:36 +0200
gtk+3.0 (3.20.5-1) unstable; urgency=medium
* New upstream release.

22
debian/control vendored
View File

@ -124,7 +124,8 @@ Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends},
libgtk-3-0 (>= ${source:Version}),
libgtk-3-common (>= ${source:Version})
libgtk-3-common (>= ${source:Version}),
gtk-update-icon-cache
Description: programs for the GTK+ graphical user interface library
GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable
@ -247,6 +248,25 @@ Description: GTK+ graphical user interface library -- gir bindings
This package can be used by other packages using the GIRepository format to
generate dynamic bindings.
Package: gtk-update-icon-cache
Architecture: any
Multi-Arch: foreign
Section: misc
Priority: optional
Depends: ${misc:Depends},
${shlibs:Depends}
Breaks: libgtk2.0-bin (<< 2.24.30-2),
libgtk-3-bin (<< 3.20.5-2)
Replaces: libgtk2.0-bin (<< 2.24.30-2),
libgtk-3-bin (<< 3.20.5-2)
Description: icon theme caching utility
gtk-update-icon-cache creates mmap()able cache files for icon themes.
.
GTK+ can use the cache files created by gtk-update-icon-cache to avoid a lot
of system call and disk seek overhead when the application starts. Since the
format of the cache files allows them to be mmap()ed shared between multiple
applications, the overall memory consumption is reduced as well.
Package: libgail-3-0
Architecture: any
Multi-Arch: same

22
debian/control.in vendored
View File

@ -124,7 +124,8 @@ Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends},
@SHARED_PKG@ (>= ${source:Version}),
@COMMON_PKG@ (>= ${source:Version})
@COMMON_PKG@ (>= ${source:Version}),
gtk-update-icon-cache
Description: programs for the GTK+ graphical user interface library
GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable
@ -247,6 +248,25 @@ Description: GTK+ graphical user interface library -- gir bindings
This package can be used by other packages using the GIRepository format to
generate dynamic bindings.
Package: gtk-update-icon-cache
Architecture: any
Multi-Arch: foreign
Section: misc
Priority: optional
Depends: ${misc:Depends},
${shlibs:Depends}
Breaks: libgtk2.0-bin (<< 2.24.30-2),
libgtk-3-bin (<< 3.20.5-2)
Replaces: libgtk2.0-bin (<< 2.24.30-2),
libgtk-3-bin (<< 3.20.5-2)
Description: icon theme caching utility
gtk-update-icon-cache creates mmap()able cache files for icon themes.
.
GTK+ can use the cache files created by gtk-update-icon-cache to avoid a lot
of system call and disk seek overhead when the application starts. Since the
format of the cache files allows them to be mmap()ed shared between multiple
applications, the overall memory consumption is reduced as well.
Package: libgail-3-0
Architecture: any
Multi-Arch: same

3
debian/gtk-update-icon-cache.install vendored Normal file
View File

@ -0,0 +1,3 @@
../../../debian/update-icon-caches usr/sbin/
usr/bin/gtk-update-icon-cache
usr/share/man/man1/gtk-update-icon-cache.1

View File

@ -1,7 +1,8 @@
#!/bin/sh -e
#!/bin/sh
set -e
if [ "$1" = remove ] ; then
# Clean up existing diversions from libgtk-3-bin
if dpkg --compare-versions "$2" lt "3.20.5-2" ; then
dpkg-divert --remove --package libgtk-3-bin --rename \
--divert /usr/sbin/update-icon-caches.gtk2 \
/usr/sbin/update-icon-caches
@ -11,5 +12,3 @@ if [ "$1" = remove ] ; then
fi
#DEBHELPER#
exit 0

View File

@ -1,5 +1,4 @@
usr/bin/gtk-query-immodules-3.0 @LIBDIR@/@SHARED_PKG@
usr/bin/gtk-update-icon-cache @LIBDIR@/@SHARED_PKG@
@MODULES_BASE_PATH@/immodules/*.so
@MODULES_BASE_PATH@/printbackends/*.so
@LIBDIR@/libgtk*.so.*

View File

@ -9,4 +9,3 @@ usr/share/man/man1/gtk-builder-tool.1
usr/share/man/man1/gtk-launch.1
usr/share/man/man1/gtk-query-immodules-3.0.1
usr/share/man/man1/gtk-query-settings.1
usr/share/man/man1/gtk-update-icon-cache.1

View File

@ -1,3 +1,2 @@
@LIBDIR@/@SHARED_PKG@/gtk-update-icon-cache-3.0 usr/bin/gtk-update-icon-cache-3.0
usr/share/doc/@COMMON_PKG@/@NEWS@ usr/share/doc/@BIN_PKG@/@NEWS@
usr/share/doc/@COMMON_PKG@/@README@ usr/share/doc/@BIN_PKG@/@README@

View File

@ -1,24 +0,0 @@
#!/bin/sh -e
set -e
if [ "$1" = install ] || [ "$1" = upgrade ] ; then
if dpkg-divert --listpackage /usr/sbin/update-icon-caches | grep -q libgtk3.0-bin; then
dpkg-divert --remove --package libgtk3.0-bin --rename \
--divert /usr/sbin/update-icon-caches.gtk2 \
/usr/sbin/update-icon-caches
dpkg-divert --remove --package libgtk3.0-bin --rename \
--divert /usr/share/man/man8/update-icon-caches.gtk2.8.gz \
/usr/share/man/man8/update-icon-caches.8.gz
fi
dpkg-divert --add --package libgtk-3-bin --rename \
--divert /usr/sbin/update-icon-caches.gtk2 \
/usr/sbin/update-icon-caches
dpkg-divert --add --package libgtk-3-bin --rename \
--divert /usr/share/man/man8/update-icon-caches.gtk2.8.gz \
/usr/share/man/man8/update-icon-caches.8.gz
fi
#DEBHELPER#
exit 0

12
debian/rules vendored
View File

@ -170,15 +170,3 @@ pre-build::
# Add dependencies to generate files from the debian/*.in ones
build-indep: $(call dh_subst_files,$(DEB_INDEP_PACKAGES))
build-arch: $(call dh_subst_files,$(DEB_ARCH_PACKAGES))
binary-install/$(SHARED_PKG)::
# Install the binaries with a -3.0 suffix
mv debian/$(SHARED_PKG)/$(LIBDIR)/$(SHARED_PKG)/gtk-update-icon-cache \
debian/$(SHARED_PKG)/$(LIBDIR)/$(SHARED_PKG)/gtk-update-icon-cache-3.0
binary-install/$(BIN_PKG)::
# Install the binaries with a -3.0 suffix
mv debian/$(BIN_PKG)/usr/share/man/man1/gtk-update-icon-cache.1 \
debian/$(BIN_PKG)/usr/share/man/man1/gtk-update-icon-cache-3.0.1
install -m 0755 -D debian/update-icon-caches \
debian/$(BIN_PKG)/usr/sbin/update-icon-caches

View File

@ -13,7 +13,7 @@ for dir in "$@"; do
fi
if [ -f "$dir"/index.theme ]; then
# Generate or regenerate the cache
if ! gtk-update-icon-cache-3.0 --force --quiet "$dir"; then
if ! gtk-update-icon-cache --force --quiet "$dir"; then
echo "WARNING: icon cache generation failed for $dir"
fi
else