* [gentoo-commits] gentoo-x86 commit in eclass: gnome2.eclass gnome2-utils.eclass ChangeLog
@ 2012-05-02 21:05 Gilles Dartiguelongue (eva)
0 siblings, 0 replies; only message in thread
From: Gilles Dartiguelongue (eva) @ 2012-05-02 21:05 UTC (permalink / raw
To: gentoo-commits
eva 12/05/02 21:05:38
Modified: gnome2.eclass gnome2-utils.eclass ChangeLog
Log:
Rewrite scrollkeeper support as proposed in bug #301311.
Revision Changes Path
1.105 eclass/gnome2.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?rev=1.105&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?rev=1.105&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2.eclass?r1=1.104&r2=1.105
Index: gnome2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- gnome2.eclass 14 Dec 2011 19:47:54 -0000 1.104
+++ gnome2.eclass 2 May 2012 21:05:38 -0000 1.105
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.104 2011/12/14 19:47:54 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.105 2012/05/02 21:05:38 eva Exp $
# @ECLASS: gnome2.eclass
# @MAINTAINER:
@@ -125,6 +125,11 @@
G2CONF="${G2CONF} --disable-maintainer-mode"
fi
+ # Pass --disable-scrollkeeper when possible
+ if grep -q "disable-scrollkeeper" configure; then
+ G2CONF="${G2CONF} --disable-scrollkeeper"
+ fi
+
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
addwrite "$(unset HOME; echo ~)/.gnome2"
@@ -172,10 +177,9 @@
# 1. The scrollkeeper database is regenerated at pkg_postinst()
# 2. ${ED}/var/lib/scrollkeeper contains only indexes for the current pkg
# thus it makes no sense if pkg_postinst ISN'T run for some reason.
- if [[ -z "$(find "${D}" -name '*.omf')" ]]; then
- export SCROLLKEEPER_UPDATE="0"
- fi
rm -rf "${ED}${sk_tmp_dir}"
+ rmdir "${ED}/var/lib" 2>/dev/null
+ rmdir "${ED}/var" 2>/dev/null
# Make sure this one doesn't get in the portage db
rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
@@ -197,6 +201,7 @@
gnome2_gconf_savelist
gnome2_icon_savelist
gnome2_schemas_savelist
+ gnome2_scrollkeeper_savelist
}
# @FUNCTION: gnome2_pkg_postinst
@@ -209,10 +214,7 @@
fdo-mime_mime_database_update
gnome2_icon_cache_update
gnome2_schemas_update
-
- if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then
- gnome2_scrollkeeper_update
- fi
+ gnome2_scrollkeeper_update
}
# @#FUNCTION: gnome2_pkg_prerm
@@ -230,8 +232,5 @@
fdo-mime_mime_database_update
gnome2_icon_cache_update
gnome2_schemas_update
-
- if [[ "${SCROLLKEEPER_UPDATE}" = "1" ]]; then
- gnome2_scrollkeeper_update
- fi
+ gnome2_scrollkeeper_update
}
1.27 eclass/gnome2-utils.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome2-utils.eclass?r1=1.26&r2=1.27
Index: gnome2-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- gnome2-utils.eclass 8 Apr 2012 02:29:44 -0000 1.26
+++ gnome2-utils.eclass 2 May 2012 21:05:38 -0000 1.27
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.26 2012/04/08 02:29:44 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.27 2012/05/02 21:05:38 eva Exp $
# @ECLASS: gnome2-utils.eclass
# @MAINTAINER:
@@ -62,13 +62,18 @@
# @DESCRIPTION:
# List of icons provided by the package
+# @ECLASS-VARIABLE: GNOME2_ECLASS_SCROLLS
+# @INTERNAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# List of scrolls (documentation files) provided by the package
+
# @ECLASS-VARIABLE: GNOME2_ECLASS_GLIB_SCHEMAS
# @INTERNAL
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of GSettings schemas provided by the package
-
DEPEND=">=sys-apps/sed-4"
@@ -274,10 +279,14 @@
omf_makefiles="${omf_makefiles} ${S}/omf.make"
fi
+ if [[ -f ${S}/gnome-doc-utils.make ]] ; then
+ omf_makefiles="${omf_makefiles} ${S}/gnome-doc-utils.make"
+ fi
+
# testing fixing of all makefiles found
# The sort is important to ensure .am is listed before the respective .in for
# maintainer mode regeneration not kicking in due to .am being newer than .in
- for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am" |sort) ; do
+ for filename in $(find "${S}" -name "Makefile.in" -o -name "Makefile.am" |sort) ; do
omf_makefiles="${omf_makefiles} ${filename}"
done
@@ -287,12 +296,10 @@
local fails=( )
for omf in ${omf_makefiles} ; do
- local rv=0
-
sed -i -e 's:scrollkeeper-update:true:' "${omf}"
retval=$?
- if [[ ! $rv -eq 0 ]] ; then
+ if [[ $retval -ne 0 ]] ; then
debug-print "updating of ${omf} failed"
# Add to the list of failures
@@ -309,16 +316,39 @@
done
}
+# @FUNCTION: gnome2_scrollkeeper_savelist
+# @DESCRIPTION:
+# Find the scrolls that are about to be installed and save their location
+# in the GNOME2_ECLASS_SCROLLS environment variable.
+# This function should be called from pkg_preinst.
+gnome2_scrollkeeper_savelist() {
+ has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+ pushd "${ED}" &> /dev/null
+ export GNOME2_ECLASS_SCROLLS=$(find 'usr/share/omf' -type f -name "*.omf" 2> /dev/null)
+ popd &> /dev/null
+}
+
# @FUNCTION: gnome2_scrollkeeper_update
# @DESCRIPTION:
# Updates the global scrollkeeper database.
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_scrollkeeper_update() {
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- if [[ -x "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" ]]; then
- einfo "Updating scrollkeeper database ..."
- "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
+ local updater="${EROOT}${SCROLLKEEPER_UPDATE_BIN}"
+
+ if [[ ! -x "${updater}" ]] ; then
+ debug-print "${updater} is not executable"
+ return
+ fi
+
+ if [[ -z "${GNOME2_ECLASS_SCROLLS}" ]]; then
+ debug-print "No scroll cache to update"
+ return
fi
+
+ ebegin "Updating scrollkeeper database ..."
+ "${updater}" -q -p "${EROOT}${SCROLLKEEPER_DIR}"
+ eend $?
}
# @FUNCTION: gnome2_schemas_savelist
1.233 eclass/ChangeLog
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.233&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.233&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.232&r2=1.233
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- ChangeLog 2 May 2012 18:31:42 -0000 1.232
+++ ChangeLog 2 May 2012 21:05:38 -0000 1.233
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.232 2012/05/02 18:31:42 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.233 2012/05/02 21:05:38 eva Exp $
+
+ 02 May 2012; Gilles Dartiguelongue <eva@gentoo.org> gnome2-utils.eclass,
+ gnome2.eclass:
+ Rewrite scrollkeeper support as proposed in bug #301311.
02 May 2012; Jeff Horelick <jdhore@gentoo.org> clutter.eclass,
gkrellm-plugin.eclass, gnome-python-common.eclass, go-mono.eclass,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-02 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-02 21:05 [gentoo-commits] gentoo-x86 commit in eclass: gnome2.eclass gnome2-utils.eclass ChangeLog Gilles Dartiguelongue (eva)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox