summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2007-01-19 20:57:00 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2007-01-19 20:57:00 +0000
commit3c4ee6db2256d58b6f8aa05e3393a3a776e5e274 (patch)
tree06aaa208f7dc2560bb158b19f0c91712987fafb4 /eclass
parentstable x86 wrt bug 151429 (diff)
downloadhistorical-3c4ee6db2256d58b6f8aa05e3393a3a776e5e274.tar.gz
historical-3c4ee6db2256d58b6f8aa05e3393a3a776e5e274.tar.bz2
historical-3c4ee6db2256d58b6f8aa05e3393a3a776e5e274.zip
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde.eclass21
1 files changed, 19 insertions, 2 deletions
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 <danarmak@gentoo.org>
#
@@ -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