summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-05-01 06:15:26 +0000
committerZac Medico <zmedico@gentoo.org>2009-05-01 06:15:26 +0000
commit82eb00f3a5a385bdad50ffe29deb52b8ef51dd9d (patch)
treedf5ed639be5504d37ebe43608c4ff537ad7a34a7 /app-text
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-82eb00f3a5a385bdad50ffe29deb52b8ef51dd9d.tar.gz
gentoo-2-82eb00f3a5a385bdad50ffe29deb52b8ef51dd9d.tar.bz2
gentoo-2-82eb00f3a5a385bdad50ffe29deb52b8ef51dd9d.zip
01 May 2009; Zac Medico <zmedico@gentoo.org> calibre-0.5.9-r2.ebuild:
Tweak xdg-desktop-menu usage to avoid sandbox violation in /usr/share/gnome/apps. (Portage version: 2.1.6.11_p13577/cvs/Linux i686)
Diffstat (limited to 'app-text')
-rw-r--r--app-text/calibre/ChangeLog6
-rw-r--r--app-text/calibre/calibre-0.5.9-r2.ebuild18
2 files changed, 18 insertions, 6 deletions
diff --git a/app-text/calibre/ChangeLog b/app-text/calibre/ChangeLog
index d81b6baba23e..6aa09fcb3451 100644
--- a/app-text/calibre/ChangeLog
+++ b/app-text/calibre/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-text/calibre
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.16 2009/04/29 07:22:48 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.17 2009/05/01 06:15:26 zmedico Exp $
+
+ 01 May 2009; Zac Medico <zmedico@gentoo.org> calibre-0.5.9-r2.ebuild:
+ Tweak xdg-desktop-menu usage to avoid sandbox violation in
+ /usr/share/gnome/apps.
*calibre-0.5.9-r2 (29 Apr 2009)
diff --git a/app-text/calibre/calibre-0.5.9-r2.ebuild b/app-text/calibre/calibre-0.5.9-r2.ebuild
index f41aa076a12e..e3171feb1e60 100644
--- a/app-text/calibre/calibre-0.5.9-r2.ebuild
+++ b/app-text/calibre/calibre-0.5.9-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.5.9-r2.ebuild,v 1.1 2009/04/29 07:22:48 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.5.9-r2.ebuild,v 1.2 2009/05/01 06:15:26 zmedico Exp $
EAPI=2
NEED_PYTHON=2.6
@@ -58,6 +58,12 @@ src_prepare() {
# For help2man to succeed, we need to tell it the path to the tools.
sed -i -e "s:\('help2man',\) \(prog\):\1 \'PYTHONPATH=\"${D}$(python_get_sitedir)\" \' + \'${D}usr/bin/\' + \2:" \
src/calibre/linux.py || die "sed'ing in the IMAGE path failed"
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
+ # calls xdg-desktop-menu (bug #258938). This also prevents
+ # "${D}"/usr/share/applications/{mimeinfo.cache,defaults.list}
+ # from being installed (we don't want them anyway).
+ sed -i -e "s:xdg-desktop-menu install:xdg-desktop-menu install --mode user:" \
+ src/calibre/linux.py || die "sed'ing in the IMAGE path failed"
distutils_src_prepare
}
@@ -89,14 +95,17 @@ EOF
chmod +x "${T}/kde-config"
- # Sandbox violation when linux.py calls xdg-desktop-menu (bug #258938).
- addpredict /usr/share/gnome/apps
PATH="${T}:${PATH}" KDEDIRS="${D}/usr" XDG_DATA_DIRS="${D}/usr/share" DESTDIR="${D}" PYTHONPATH="${S}/build/lib" \
python "${S}"/src/${PN}/linux.py \
--use-destdir --do-not-reload-udev-hal \
--group-file="${ROOT}"/etc/group --dont-check-root \
|| die "post-installation failed."
+ # The menu entries end up here due to '--mode user' being added to
+ # xdg-desktop-menu options in src_prepare.
+ domenu "$HOME"/.local/share/applications/*.desktop || \
+ die "failed to install .desktop menu files"
+
# Move the bash-completion file and properly install it.
mv "${D}"/etc/bash_completion.d/calibre "${S}/" \
|| die "cannot move the bash-completion file"
@@ -104,8 +113,7 @@ EOF
find "${D}"/etc -type d -empty -delete
# Removing junk.
- rm -r "${D}"/usr/share/applications/{mimeinfo.cache,defaults.list} \
- "${D}"/usr/share/mime/{subclasses,XMLnamespaces,globs{,2},mime.cache,magic,aliases,{generic-,}icons} \
+ rm -r "${D}"/usr/share/mime/{subclasses,XMLnamespaces,globs{,2},mime.cache,magic,aliases,{generic-,}icons} \
"${D}"/usr/share/{applnk,desktop-directories} \
"${D}$(python_get_sitedir)"/pyPdf
}