Bug 179230

Summary: [patch] [bsd.pkgng.mk] gtk-query-immodules-2.0 and 3.0 should be run post-deinstall
Product: Ports & Packages Reporter: Antoine Brodin <antoine>
Component: Individual Port(s)Assignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
bsd.pkgng.mk.diff
none
gqi.diff none

Description Antoine Brodin freebsd_committer 2013-06-02 21:40:00 UTC
Currently with poudriere, file modification is detected post-deinstall:
====>> Checking for extra files and directories
====>> Files or directories modified:
etc/gtk-2.0/gtk.immodules
===>  Cleaning for scim-1.4.9_1


%%# diff preinst postdeinst
%%3c3
%%< # Created by /usr/local/bin/gtk-query-immodules-2.0 from gtk+-2.24.18
%%---
%%> # Created by gtk-query-immodules-2.0 from gtk+-2.24.18
%%39a40,42
%%> "/usr/local/lib/gtk-2.0/immodules/im-scim.so"
%%> "scim" "SCIM Input Method" "scim" "/usr/local/share/locale" "ja:ko:zh"
%%>


gtk-query-immodules-2.0 and 3.0 should be run post-deinstall

Note that this patch is not enough to fix the leftover detection, as the path of gtk-query-immodules is embedded in output

With patch applied:

%%# diff preinst postdeinst
%%3c3
%%< # Created by /usr/local/bin/gtk-query-immodules-2.0 from gtk+-2.24.18
%%---
%%> # Created by gtk-query-immodules-2.0 from gtk+-2.24.18

More consistency is needed in ports using this file
Comment 1 Edwin Groothuis freebsd_committer 2013-06-02 21:40:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.pkgng.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Antoine Brodin freebsd_committer 2013-06-15 21:22:25 UTC
Attached patch was tested with  "poudriere bulk -t" on all affected ports:

chinese/oxim
chinese/fcitx
chinese/wenju
chinese/gcin
japanese/im-ja
korean/imhangul
textproc/uim-gtk3
textproc/linux-f10-scim-gtk
textproc/scim
textproc/uim-gtk
textproc/linux-f10-scim-libs
textproc/ibus
Comment 3 dfilter service freebsd_committer 2013-06-17 17:19:05 UTC
Author: antoine
Date: Mon Jun 17 16:18:54 2013
New Revision: 321140
URL: http://svnweb.freebsd.org/changeset/ports/321140

Log:
  - Add gtk-query-immodules to _FORCE_POST_PATTERNS to run it post-deinstall
  with pkg
  - Consistently use full path when running gtk-query-immodules as the path
  is embedded in output (we prefer reproducible output)
  
  This fixes leftovers reported by poudriere
  ====>> Files or directories modified:
  etc/gtk-2.0/gtk.immodules
  
  PR:		ports/179230
  Approved by:	portmgr (bapt)

Modified:
  head/Mk/bsd.pkgng.mk
  head/chinese/fcitx/Makefile
  head/chinese/fcitx/pkg-plist
  head/chinese/gcin/Makefile
  head/chinese/gcin/pkg-plist
  head/chinese/oxim/Makefile
  head/chinese/oxim/pkg-plist
  head/chinese/wenju/Makefile
  head/chinese/wenju/pkg-plist   (contents, props changed)
  head/textproc/ibus/Makefile
  head/textproc/ibus/pkg-plist
  head/textproc/scim/Makefile
  head/textproc/scim/pkg-plist
  head/textproc/uim-gtk/pkg-plist
  head/textproc/uim-gtk3/pkg-plist

Modified: head/Mk/bsd.pkgng.mk
==============================================================================
--- head/Mk/bsd.pkgng.mk	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/Mk/bsd.pkgng.mk	Mon Jun 17 16:18:54 2013	(r321140)
@@ -20,6 +20,7 @@ PKGUPGRADE?=		${PKGDIR}/pkg-upgrade
 _FORCE_POST_PATTERNS=	rmdir kldxref mkfontscale mkfontdir fc-cache \
 						fonts.dir fonts.scale gtk-update-icon-cache \
 						gio-querymodules \
+						gtk-query-immodules \
 						ldconfig \
 						load-octave-pkg \
 						update-desktop-database update-mime-database \

Modified: head/chinese/fcitx/Makefile
==============================================================================
--- head/chinese/fcitx/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/fcitx/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -113,10 +113,10 @@ EXTRA_PATCHES+=	${FILESDIR}/getline-src_
 
 post-install:
 .if ${PORT_OPTIONS:MGTK2}
-	-gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
+	-${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 .endif
 .if ${PORT_OPTIONS:MGTK3}
-	-gtk-query-immodules-3.0 > ${LOCALBASE}/lib/gtk-3.0/${GTK3_VERSION}/immodules.cache
+	-${LOCALBASE}/bin/gtk-query-immodules-3.0 > ${LOCALBASE}/lib/gtk-3.0/${GTK3_VERSION}/immodules.cache
 .endif
 	@${ECHO_CMD}
 	@${CAT} ${PKGMESSAGE}

Modified: head/chinese/fcitx/pkg-plist
==============================================================================
--- head/chinese/fcitx/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/fcitx/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -86,11 +86,11 @@ lib/libfcitx-utils.so.0.1
 lib/girepository-1.0/Fcitx-1.0.typelib
 share/gir-1.0/Fcitx-1.0.gir
 %%GTK2%%lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-fcitx.so
-%%GTK2%%@exec gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules
-%%GTK2%%@unexec gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules
 %%GTK3%%lib/gtk-3.0/%%GTK3_VERSION%%/immodules/im-fcitx.so
-%%GTK3%%@exec gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
-%%GTK3%%@unexec gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+%%GTK3%%@exec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+%%GTK3%%@unexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
 %%QT4%%lib/qt4/plugins/inputmethods/libqtim-fcitx.so
 %%QT4%%@dirrmtry lib/qt4/plugins/inputmethods
 %%QT4%%@dirrmtry lib/qt4/plugins

Modified: head/chinese/gcin/Makefile
==============================================================================
--- head/chinese/gcin/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/gcin/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -115,7 +115,7 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
 .endfor
 .endif
-	@gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
+	@${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO} To display this message again, type \`pkg_info -D ${PKGNAME}\'
 

Modified: head/chinese/gcin/pkg-plist
==============================================================================
--- head/chinese/gcin/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/gcin/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -154,5 +154,5 @@ share/icons/gcin.png
 @dirrmtry lib/gtk-2.0/immodules
 @dirrmtry lib/gtk-2.0
 @dirrm lib/gcin
-@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/chinese/oxim/Makefile
==============================================================================
--- head/chinese/oxim/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/oxim/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -84,7 +84,7 @@ post-patch:
 
 post-install:
 .if ${PORT_OPTIONS:MGTK2}
-	@gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
+	@${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
 .endif
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}

Modified: head/chinese/oxim/pkg-plist
==============================================================================
--- head/chinese/oxim/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/oxim/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -35,5 +35,5 @@ share/locale/zh_TW/LC_MESSAGES/oxim.mo
 @dirrmtry share/locale/zh_HK
 %%GTK2%%@dirrmtry lib/gtk-2.0/immodules
 %%GTK2%%@dirrmtry lib/gtk-2.0
-%%GTK2%%@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-%%GTK2%%@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK2%%@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/chinese/wenju/Makefile
==============================================================================
--- head/chinese/wenju/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/wenju/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -31,6 +31,6 @@ PLIST_SUB+=	NLS="@comment "
 .endif
 
 post-install:
-	gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
+	${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${PREFIX}/etc/gtk-2.0/gtk.immodules
 
 .include <bsd.port.mk>

Modified: head/chinese/wenju/pkg-plist
==============================================================================
--- head/chinese/wenju/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/chinese/wenju/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -18,5 +18,5 @@ lib/gtk-2.0/%%GTK2_VERSION%%/immodules/i
 %%DATADIR%%/wubi.tim
 %%DATADIR%%/wubihua-n.tim
 @dirrm %%DATADIR%%
-@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/textproc/ibus/Makefile
==============================================================================
--- head/textproc/ibus/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/ibus/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -97,9 +97,9 @@ post-install:
 	@${MKDIR} ${PREFIX}/etc/xdg/autostart
 	@${INSTALL_DATA} ${WRKSRC}/bus/ibus.desktop ${PREFIX}/etc/xdg/autostart
 .	if ${PORT_OPTIONS:MGTK3}
-		@gtk-query-immodules-3.0 --update-cache
+		@${LOCALBASE}/bin/gtk-query-immodules-3.0 > ${LOCALBASE}/lib/gtk-3.0/${GTK3_VERSION}/immodules.cache
 .	endif
-	@gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
+	@${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
 

Modified: head/textproc/ibus/pkg-plist
==============================================================================
--- head/textproc/ibus/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/ibus/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -328,7 +328,7 @@ share/icons/hicolor/scalable/apps/ibus.s
 @dirrm include/ibus-1.0
 @dirrmtry etc/xdg/autostart
 @dirrmtry etc/xdg
-%%GTK3%%@exec gtk-query-immodules-3.0 --update-cache
-@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-%%GTK3%%@unexec gtk-query-immodules-3.0 --update-cache
-@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK3%%@exec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+%%GTK3%%@unexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/textproc/scim/Makefile
==============================================================================
--- head/textproc/scim/Makefile	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/scim/Makefile	Mon Jun 17 16:18:54 2013	(r321140)
@@ -36,7 +36,7 @@ post-patch:
 		${WRKSRC}/src/Makefile.in
 
 post-install:
-	@gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
+	@${LOCALBASE}/bin/gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules
 	@${CAT} ${PKGMESSAGE}
 	@${ECHO} To display this message again, type ${PKG_INFO} -D ${PKGNAME}
 

Modified: head/textproc/scim/pkg-plist
==============================================================================
--- head/textproc/scim/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/scim/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -167,5 +167,5 @@ share/locale/zh_TW/LC_MESSAGES/scim.mo
 @dirrmtry lib/scim-1.0/1.4.0
 @dirrmtry lib/scim-1.0
 @dirrmtry share/applications
-@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/textproc/uim-gtk/pkg-plist
==============================================================================
--- head/textproc/uim-gtk/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/uim-gtk/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -6,5 +6,5 @@ bin/uim-toolbar-gtk-systray
 lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-uim.a
 lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-uim.la
 lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-uim.so
-@exec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
-@unexec gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 > %D/etc/gtk-2.0/gtk.immodules

Modified: head/textproc/uim-gtk3/pkg-plist
==============================================================================
--- head/textproc/uim-gtk3/pkg-plist	Mon Jun 17 16:17:46 2013	(r321139)
+++ head/textproc/uim-gtk3/pkg-plist	Mon Jun 17 16:18:54 2013	(r321140)
@@ -9,5 +9,5 @@ lib/gtk-3.0/%%GTK3_VERSION%%/immodules/i
 libexec/uim-candwin-gtk3
 libexec/uim-candwin-horizontal-gtk3
 libexec/uim-candwin-tbl-gtk3
-@exec gtk-query-immodules-3.0 > %D/etc/gtk-3.0/gtk.immodules
-@unexec gtk-query-immodules-3.0 > %D/etc/gtk-3.0/gtk.immodules
+@exec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
+@unexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 > %D/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Antoine Brodin freebsd_committer 2013-06-17 17:29:15 UTC
State Changed
From-To: open->closed

Patch committed.