Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2007 02:10:11 +0100
From:      "Danny Pansters" <danny@ricin.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/108364: [patch] x11-toolkits/gtk20: plist problem with icons dir
Message-ID:  <20070126011018.C9DB113C43E@mx1.freebsd.org>
Resent-Message-ID: <200701260120.l0Q1KLd2008885@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         108364
>Category:       ports
>Synopsis:       [patch] x11-toolkits/gtk20: plist problem with icons dir
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 26 01:20:21 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Danny Pansters
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD desktop.homenet 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Fri Jan 12 23:22:55 CET 2007 danny@desktop.homenet:/usr/obj/usr/src/sys/DESKTOP i386

>Description:
	When gtk20 installs from port or package it creates icon cache files in
	icon directories under LOCALBASE/share/icons/. When gtk20 deinstalls
	from port or package it deletes such cache files.

	There can be situations when there have been icons installed in such
	directories that were removed, e.g. from the kdelibs3 or kdebase3 package
	If those are deinstalled before gtk20 gets deinstalled empty icon
	directories will remain and will cause things such as tinderbox package
	build runs to fail in the end because of the left over directories.

	I discovered this problem with the x11-themes/gtk-qt-engine port which
	has dependencies for both kdelibs and gtk20. It also has an optional
	(used by default) dependency for libbonoboui. When the latter is used,
	during a tinderbox run upon reinstall, gtk20 will be removed after
	kdelibs/kdehier and the crystalsvg icon dir is left behind, causing
	an error like this:

=== Checking filesystem state after all packages deleted
================================================================
list of extra files and directories in / (not present on clean system but present after everything was deinstalled)
2784229        4 drwxr-xr-x    3 root             wheel                 512 Jan 25 22:58 usr/local/share/icons
2874128        4 drwxr-xr-x    2 root             wheel                 512 Jan 25 22:58 usr/local/share/icons/crystalsvg
================================================================
build of /usr/ports/x11-themes/gtk-qt-engine ended at Thu Jan 25 23:00:29 UTC 2007

	The solution for this kind of problem seems to be to make sure no empty
	icon dirs are left behind after deleting any cachefile in them upon
	gtk20 deinstall. After applying this my tinderbox no longer complains 
	about a left-over crystalsvg directory.

	Tinderbox log for current gtk-qt-engine-0.7_4 with this plist patch:
	http://freebsd.ricin.com/misc/gtk-qt-engine-0.7_4-with.log

	Tinderbox log for current gtk-qt-engine-0.7_4 without:
	http://freebsd.ricin.com/misc/gtk-qt-engine-0.7_4-without.log

>How-To-Repeat:
	Test gtk-qt-engine on tinderbox (problem found after PR'ing a revision
	of this port but with the current port the same problem will occur)
>Fix:

--- ports::x11-toolkits::gtk20.diff begins here ---
diff -ruN ports/x11-toolkits/gtk20.orig/pkg-plist ports/x11-toolkits/gtk20/pkg-plist
--- ports/x11-toolkits/gtk20.orig/pkg-plist	Sat Jan  6 02:11:03 2007
+++ ports/x11-toolkits/gtk20/pkg-plist	Thu Jan 25 21:25:14 2007
@@ -588,6 +588,7 @@
 share/themes/Raleigh/gtk-2.0/gtkrc
 @exec /usr/bin/find %%LOCALBASE%%/share/icons -type d -depth 1 -exec %D/bin/gtk-update-icon-cache -q -f {} \; 2>/dev/null || /usr/bin/true
 @unexec /usr/bin/find %%LOCALBASE%%/share/icons -type f -depth 2 -name icon-theme.cache -delete 2>/dev/null || /usr/bin/true
+@unexec /usr/bin/find %%LOCALBASE%%/share/icons -type d -depth 1 -empty -delete 2>/dev/null || /usr/bin/true
 @dirrm share/themes/Raleigh/gtk-2.0
 @dirrm share/themes/Raleigh
 @dirrm share/themes/Emacs/gtk-2.0-key
--- ports::x11-toolkits::gtk20.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070126011018.C9DB113C43E>