* [gentoo-dev] gnome2 and gnome2-utils eclass changes
@ 2012-04-19 20:47 Gilles Dartiguelongue
2012-05-02 21:11 ` Gilles Dartiguelongue
0 siblings, 1 reply; 2+ messages in thread
From: Gilles Dartiguelongue @ 2012-04-19 20:47 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 849 bytes --]
Per bug #301311 [1], I decided to fix a couple of issue I had with the
current way of dealing with scrollkeeper.
Even though scrollkeeper is almost dead, it is still present in quite a
few gnome packages notably due to gnome-doc-utils.make and the goal of
these changes is to make scrollkeeper a bit more in line with gsettings,
gconf and icons support.
If you have some questions about the changes please read the comments on
the bug report first.
I searched the tree for potential problems but as far as I could see,
only three ebuilds that define SCROLLKEEPER_UPDATE would need to be
updated.
If there is no objection, I will push the changes this weekend (it has
been reviewed by a few gnome team members already).
[1] https://bugs.gentoo.org/show_bug.cgi?id=301311
--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
[-- Attachment #1.2: gnome2.eclass.patch --]
[-- Type: text/x-patch, Size: 1884 bytes --]
Index: gnome2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v
retrieving revision 1.104
diff -u -B -u -r1.104 gnome2.eclass
--- gnome2.eclass 14 Dec 2011 19:47:54 -0000 1.104
+++ gnome2.eclass 14 Apr 2012 18:28:48 -0000
@@ -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
}
[-- Attachment #1.3: gnome2-utils.eclass.patch --]
[-- Type: text/x-patch, Size: 3023 bytes --]
Index: gnome2-utils.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v
retrieving revision 1.26
diff -u -B -u -r1.26 gnome2-utils.eclass
--- gnome2-utils.eclass 8 Apr 2012 02:29:44 -0000 1.26
+++ gnome2-utils.eclass 14 Apr 2012 18:29:12 -0000
@@ -62,6 +62,12 @@
# @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
@@ -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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] gnome2 and gnome2-utils eclass changes
2012-04-19 20:47 [gentoo-dev] gnome2 and gnome2-utils eclass changes Gilles Dartiguelongue
@ 2012-05-02 21:11 ` Gilles Dartiguelongue
0 siblings, 0 replies; 2+ messages in thread
From: Gilles Dartiguelongue @ 2012-05-02 21:11 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
Le jeudi 19 avril 2012 à 22:47 +0200, Gilles Dartiguelongue a écrit :
> Per bug #301311 [1], I decided to fix a couple of issue I had with the
> current way of dealing with scrollkeeper.
[...]
> [1] https://bugs.gentoo.org/show_bug.cgi?id=301311
FTR, since there were no complaints, I commited the changes with
appropriate ebuild modifications for camorama (with glib-2.32 build
fixes), ekiga and gtetrinet.
If there is any problem with it, feel free to ping me on irc or by mail.
--
Gilles Dartiguelongue <eva@gentoo.org>
Gentoo
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-02 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19 20:47 [gentoo-dev] gnome2 and gnome2-utils eclass changes Gilles Dartiguelongue
2012-05-02 21:11 ` Gilles Dartiguelongue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox