Bug 206019

Summary: Mk/bsd.gnome.mk: GTK icon cache not updated for Python ports
Product: Ports & Packages Reporter: Henry Hu <henry.hu.sh>
Component: Ports FrameworkAssignee: freebsd-gnome (Nobody) <gnome>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: gnome, kwm, portmgr, ports-bugs, tcberner, vlad-fbsd
Priority: --- Keywords: needs-qa
Version: LatestFlags: vlad-fbsd: maintainer-feedback? (gnome)
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205911
Bug Depends on: 205432    
Bug Blocks:    

Description Henry Hu 2016-01-08 03:33:42 UTC
For a python port which uses gtk and installs icons, gtk-update-icon-cache is not executed.
The plist for such ports is automatically generated, and it seems like that the check for icons happens before the real plist is generated.

Let's take deskutils/syncthing-gtk as an example. The check for icons happens in bsd.gnome.mk:
.  if defined(INSTALLS_ICONS)
	@${RM} -f ${TMPPLIST}.icons1
	@for i in `${GREP} "^share/icons/.*/" ${TMPPLIST} | ${CUT} -d / -f 1-3 | ${SORT} -u`; do \
		${ECHO_CMD} "@rmtry $${i}/icon-theme.cache" \
			>> ${TMPPLIST}.icons1; \
		${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/$${i} 2>/dev/null || /usr/bin/true" \
			>> ${TMPPLIST}; \
		${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/$${i} 2>/dev/null || /usr/bin/true" \
			>> ${TMPPLIST}; \
	done

However, if we insert "cat ${TMPPLIST}" before the "@for", you can see that
cat /usr/ports/deskutils/syncthing-gtk/work/.PLIST.mktmp
/usr/local/share/licenses/syncthing-gtk-0.8/catalog.mk
/usr/local/share/licenses/syncthing-gtk-0.8/LICENSE
/usr/local/share/licenses/syncthing-gtk-0.8/GPLv2

so the plist is not yet filled, and no icon is detected. As a result, gtk-update-icon-cache is not executed, and the new icons cannot be used by the applications.
Comment 1 Koop Mast freebsd_committer freebsd_triage 2016-01-17 22:04:40 UTC
I think I know how to fix this. but that depends on the linked PR being committed.

This is indeed a interaction between gnome-post-install and python's autoplist.

Thanks for the report.
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2020-12-19 14:33:58 UTC
Moin moin 

Please re-open if this is still an issue.


mfg Tobias