From: Diego Elio Pettenò Date: Fri, 19 Jan 2007 20:57:00 +0000 (+0000) Subject: Add two warnings whenever a package installs .desktop files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c4ee6db2256d58b6f8aa05e3393a3a776e5e274;p=gentoo.git Add two warnings whenever a package installs .desktop files a) in the deprecated /usr/share/applnk - it is deprecated for a reason (non-standard), plus it won't be checked by GNOME or other non-KDE menus; b) without a Categories attribute (it won't be shown properly, it will fall into the Lost & Found menu. Now let's enjoy the bugs flowing. --- diff --git a/eclass/kde.eclass b/eclass/kde.eclass index a94a4c5ad7e9..d5a670cd5800 100644 --- a/eclass/kde.eclass +++ b/eclass/kde.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.188 2007/01/16 13:54:03 caleb Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.189 2007/01/19 20:57:00 flameeyes Exp $ # # Author Dan Armak # @@ -445,6 +445,23 @@ slot_rebuild() { echo } +kde_pkg_preinst() { + if [[ $(find "${D}/${PREFIX}/share/applnk" -name '*.desktop' 2>/dev/null | wc -l) != "0" ]]; then + ewarn "KDE Team warning: this package (${PF}) is installing" + ewarn " .desktop files in the obsolete applnk path:" + ewarn " ${PREFIX}/share/applnk. It won't be shown on non-KDE" + ewarn " menus and applications." + fi + + if [[ $(egrep -q -r --include '*.desktop' --files-without-match \ + '^Categories' "${D}/${PREFIX}/share/applications" 2>/dev/null \ + | wc -l) != "0" ]] ; then + ewarn "KDE Team warning: this package (${PF}) is installing" + ewarn " .desktop files without the Categories attribute; it will" + ewarn " be shown in the Lost & Found menu." + fi +} + kde_pkg_postinst() { buildsycoca } @@ -453,4 +470,4 @@ kde_pkg_postrm() { buildsycoca } -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm +EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst pkg_postrm pkg_preinst