diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-01-19 20:57:00 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-01-19 20:57:00 +0000 |
commit | 7f63c0d02878408ec9c2b539be908868cd4a2e27 (patch) | |
tree | 056f8372637713bc915123fe13b45b4b518584ca /eclass/kde.eclass | |
parent | stable x86 wrt bug 151429 (diff) | |
download | gentoo-2-7f63c0d02878408ec9c2b539be908868cd4a2e27.tar.gz gentoo-2-7f63c0d02878408ec9c2b539be908868cd4a2e27.tar.bz2 gentoo-2-7f63c0d02878408ec9c2b539be908868cd4a2e27.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/kde.eclass')
-rw-r--r-- | eclass/kde.eclass | 21 |
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 |