Bug 206019 - Mk/bsd.gnome.mk: GTK icon cache not updated for Python ports
Summary: Mk/bsd.gnome.mk: GTK icon cache not updated for Python ports
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gnome mailing list
URL:
Keywords: needs-qa
Depends on: 205432
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-08 03:33 UTC by Henry Hu
Modified: 2016-01-17 22:04 UTC (History)
5 users (show)

See Also:
vlad-fbsd: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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.