diff options
author | Christoph Mende <angelos@gentoo.org> | 2008-09-21 23:00:22 +0000 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2008-09-21 23:00:22 +0000 |
commit | acf1194a573418e367281c45f54cbd7ae09b9327 (patch) | |
tree | 384bfbc53a6138343f8abb3123cd0ae30d7c0dcf /xfce-extra | |
parent | Made examples 64bit clean and limited to -j1, bugs 235737 and 235967 by Marci... (diff) | |
download | historical-acf1194a573418e367281c45f54cbd7ae09b9327.tar.gz historical-acf1194a573418e367281c45f54cbd7ae09b9327.tar.bz2 historical-acf1194a573418e367281c45f54cbd7ae09b9327.zip |
Fix error message when ejecting mounted CD using physical button, bug 199615
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.27-rc6 x86_64
Diffstat (limited to 'xfce-extra')
-rw-r--r-- | xfce-extra/exo/ChangeLog | 9 | ||||
-rw-r--r-- | xfce-extra/exo/Manifest | 10 | ||||
-rw-r--r-- | xfce-extra/exo/exo-0.3.4-r1.ebuild | 61 | ||||
-rw-r--r-- | xfce-extra/exo/files/exo-0.3.4-eject.patch | 207 |
4 files changed, 282 insertions, 5 deletions
diff --git a/xfce-extra/exo/ChangeLog b/xfce-extra/exo/ChangeLog index 300287923040..fe9ccea9faab 100644 --- a/xfce-extra/exo/ChangeLog +++ b/xfce-extra/exo/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for xfce-extra/exo # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/xfce-extra/exo/ChangeLog,v 1.56 2008/09/21 17:05:14 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/exo/ChangeLog,v 1.57 2008/09/21 23:00:22 angelos Exp $ + +*exo-0.3.4-r1 (21 Sep 2008) + + 21 Sep 2008; Christoph Mende <angelos@gentoo.org> + +files/exo-0.3.4-eject.patch, +exo-0.3.4-r1.ebuild: + Fix error message when ejecting mounted CD using physical button, bug + 199615 21 Sep 2008; Christoph Mende <angelos@gentoo.org> -exo-0.3.2.ebuild: Removed old diff --git a/xfce-extra/exo/Manifest b/xfce-extra/exo/Manifest index b03dd9e9016a..ac7406438833 100644 --- a/xfce-extra/exo/Manifest +++ b/xfce-extra/exo/Manifest @@ -1,14 +1,16 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX exo-0.3.4-eject.patch 6692 RMD160 674aebb271c14f5cc1f1e285cea8fd4c4ad3d41f SHA1 4517c4226bdcdc5e325b7dfc56c500acd1f3b00f SHA256 cc4c3551a06b2161355956eced4345e5bdd50d738a8f8d22f0604d306234c289 DIST exo-0.3.4.tar.bz2 1300127 RMD160 e021f030a624c522c819ec0f3a8682a1007ae748 SHA1 4f7a3f46592fd0311be1f011f17431f211cc1fcb SHA256 a5373e9bd6055caa7cd5d06128f6236cfd2f4f6657ea4a85d7bd9eafe5bf0538 +EBUILD exo-0.3.4-r1.ebuild 1673 RMD160 5e83982de24a5d0ec2a5b602e0ac8d345ada1885 SHA1 53ee91a7d4a6069fa54a7f3577811343d6338809 SHA256 019b444a3d6d549ca7ac0fd3d9cc488f10bb784e915d422a9cde4f821845a654 EBUILD exo-0.3.4.ebuild 1604 RMD160 ec5ab1745601f35bac9a527b1f45fa74ea4c442e SHA1 53eb93b9f94f3a4578d4017e353f84f3cdbdf4a2 SHA256 928b251c2965cdfe94d475eeed1125f783dce4e293a3b10a8ba9d83b61cfb709 -MISC ChangeLog 6731 RMD160 396fde3b0c61015f498ca77f7c90ffe8fd96e1f5 SHA1 69ed8917474cd7f46d543b399890a21867b8b1aa SHA256 8f5044c933073bd0fb79d5de46958a0dbeff89dc16e2116a0b8f8a6575235484 +MISC ChangeLog 6948 RMD160 89d82b557512ae327e464dba9f73ea619b512c15 SHA1 4040af9fa40d02d40bb9d219d594b15d78be7885 SHA256 235e6f854231d21342c3bfe1a260f0a575781e254dc553a2bd9cb8400292ef2d MISC metadata.xml 157 RMD160 d7470fe88d1b96f3a7f1ef26fb7dc646b4a1b907 SHA1 7eae91f2588bdae8667d37a98fb3090d539eeca1 SHA256 44350daa7594842894d676413708d8ea77ccb0017bed24711af5b256281f5e61 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkjWftEACgkQKhnDs22gwa9IxwCgqFNjBPa0QGsI00AFsgv/Pe03 -F5IAn131Qb7zQWoMrh8VObNCpOT3BeAN -=vWOd +iEYEARECAAYFAkjW0g8ACgkQKhnDs22gwa/M5ACdFu/FxH13WD0O+VfO6ijCohA/ +rQEAoPnZxLBWIluTxjDV1rqGeLc2hUtZ +=nBTk -----END PGP SIGNATURE----- diff --git a/xfce-extra/exo/exo-0.3.4-r1.ebuild b/xfce-extra/exo/exo-0.3.4-r1.ebuild new file mode 100644 index 000000000000..bb019b5edd6f --- /dev/null +++ b/xfce-extra/exo/exo-0.3.4-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/xfce-extra/exo/exo-0.3.4-r1.ebuild,v 1.1 2008/09/21 23:00:22 angelos Exp $ + +inherit eutils xfce44 python multilib + +XFCE_VERSION=4.4.2 +xfce44 +xfce44_core_package + +DESCRIPTION="Extensions, widgets and framework library with session management support" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="debug doc hal libnotify python" + +RDEPEND=">=dev-lang/perl-5.6 + dev-perl/URI + >=dev-libs/glib-2.6 + >=x11-libs/gtk+-2.6 + >=xfce-base/libxfce4util-${XFCE_MASTER_VERSION} + >=xfce-base/xfce-mcs-manager-${XFCE_MASTER_VERSION} + >=xfce-base/xfce-mcs-plugins-${XFCE_MASTER_VERSION} + libnotify? ( x11-libs/libnotify ) + hal? ( >=sys-apps/hal-0.5.7.1 ) + python? ( dev-python/pygtk )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + doc? ( dev-util/gtk-doc ) + dev-util/intltool" + +XFCE_CONFIG="${XFCE_CONFIG} $(use_enable python) \ + $(use_enable libnotify notifications) \ + $(use_enable hal) --enable-mcs-plugin" + +DOCS="AUTHORS ChangeLog HACKING NEWS README THANKS TODO" + +# See bug 166568 for reference +src_unpack() { + unpack ${A} + cd "${S}" + + sed -i -e 's:-Werror::g' "${S}"/configure + epatch "${FILESDIR}"/${P}-eject.patch +} + +# See bug 164780 for reference +src_install() { + xfce44_src_install + rm -f "${D}"/usr/lib*/python*/site-packages/pyexo.py[co] + rm -f "${D}"/usr/lib*/python*/site-packages/${PN}-0.3/${PN}/__init__.py[co] +} + +pkg_postinst() { + xfce44_pkg_postinst + python_version + python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages +} + +pkg_postrm() { + xfce44_pkg_postrm + python_mod_cleanup +} diff --git a/xfce-extra/exo/files/exo-0.3.4-eject.patch b/xfce-extra/exo/files/exo-0.3.4-eject.patch new file mode 100644 index 000000000000..316f081b4394 --- /dev/null +++ b/xfce-extra/exo/files/exo-0.3.4-eject.patch @@ -0,0 +1,207 @@ +diff --git a/exo-mount/exo-mount-hal.c b/exo-mount/exo-mount-hal.c +index 791a536..4084719 100644 +--- a/exo-mount/exo-mount-hal.c ++++ b/exo-mount/exo-mount-hal.c +@@ -145,6 +145,42 @@ exo_mount_hal_propagate_error (GError **error, + } + + ++static gboolean ++string_in_list(gchar * const *haystack, const gchar *needle) ++{ ++ gint n; ++ ++ if (!haystack) ++ return FALSE; ++ ++ for (n=0; haystack[n]; ++n) { ++ if (!strcmp (haystack[n], needle)) ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++ ++static gboolean ++device_has_interface(const gchar *udi, const gchar *iface, ++ DBusError *derror) ++{ ++ gboolean result; ++ gchar **interfaces; ++ ++ /* determine the info.interfaces property of the device */ ++ interfaces = libhal_device_get_property_strlist (hal_context, udi, ++ "info.interfaces", derror); ++ ++ /* check for the interface we need */ ++ result = string_in_list(interfaces, iface); ++ libhal_free_string_array(interfaces); ++ ++ return result; ++} ++ ++ ++ + + /** + * exo_mount_hal_device_from_udi: +@@ -158,18 +194,15 @@ exo_mount_hal_propagate_error (GError **error, + * or %NULL in case of an error. + **/ + ExoMountHalDevice* +-exo_mount_hal_device_from_udi (const gchar *udi, ++exo_mount_hal_device_from_udi (const gchar *in_udi, + GError **error) + { + ExoMountHalDevice *device = NULL; + DBusError derror; +- gchar **interfaces; +- gchar **volume_udis; +- gchar *volume_udi = NULL; + gint n_volume_udis; +- gint n; ++ gchar *udi; + +- g_return_val_if_fail (udi != NULL, NULL); ++ g_return_val_if_fail (in_udi != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* make sure the HAL support is initialized */ +@@ -179,55 +212,60 @@ exo_mount_hal_device_from_udi (const gchar *udi, + /* initialize D-Bus error */ + dbus_error_init (&derror); + +-again: +- /* determine the info.interfaces property of the device */ +- interfaces = libhal_device_get_property_strlist (hal_context, udi, "info.interfaces", &derror); +- if (G_UNLIKELY (interfaces == NULL)) ++ udi = g_strdup (in_udi); ++ /* at this point, we own udi */ ++ ++ /* maybe we have a mountable device here */ ++ while(G_UNLIKELY (!device_has_interface (udi, ++ "org.freedesktop.Hal.Device.Volume", &derror))) + { +- /* reset D-Bus error */ +- dbus_error_free (&derror); ++ gchar **volume_udis; + +- /* release any previous volume UDI */ +- g_free (volume_udi); +- volume_udi = NULL; ++ /* maybe there was a D-Bus error? gotta check */ ++ if (G_UNLIKELY (dbus_error_is_set (&derror))) ++ { ++ exo_mount_hal_propagate_error (error, &derror); ++ g_free (udi); ++ return NULL; ++ } ++ ++ /* maybe we have a volume whose parent is identified by the udi */ ++ volume_udis = libhal_manager_find_device_string_match (hal_context, ++ "info.parent", udi, &n_volume_udis, &derror); + +- /* ok, but maybe we have a volume whose parent is identified by the udi */ +- volume_udis = libhal_manager_find_device_string_match (hal_context, "info.parent", udi, &n_volume_udis, &derror); + if (G_UNLIKELY (volume_udis == NULL)) + { +-err0: exo_mount_hal_propagate_error (error, &derror); +- goto out; ++ exo_mount_hal_propagate_error (error, &derror); ++ g_free (udi); ++ return NULL; + } + else if (G_UNLIKELY (n_volume_udis < 1)) + { +- /* no match, we cannot handle that device */ + libhal_free_string_array (volume_udis); +- goto err1; ++ dbus_error_free (&derror); ++ /* definitely not a device that we're able to ++ * mount, eject or unmount */ ++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, ++ _("Given device \"%s\" is not a volume or drive"), udi); ++ g_free (udi); ++ return NULL; + } + ++ g_free (udi); ++ + /* use the first volume UDI... */ +- volume_udi = g_strdup (volume_udis[0]); ++ udi = g_strdup (volume_udis[0]); + libhal_free_string_array (volume_udis); +- + /* ..and try again using that UDI */ +- udi = (const gchar *) volume_udi; +- goto again; + } + +- /* verify that we have a mountable device here */ +- for (n = 0; interfaces[n] != NULL; ++n) +- if (strcmp (interfaces[n], "org.freedesktop.Hal.Device.Volume") == 0) +- break; +- if (G_UNLIKELY (interfaces[n] == NULL)) +- { +- /* definitely not a device that we're able to mount, eject or unmount */ +-err1: g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("Given device \"%s\" is not a volume or drive"), udi); +- goto out; +- } ++ /* at this point, udi contains the UDI of something ++ * that implements Hal.Device.Volume. ++ * udi is the only resource that we hold here. */ + + /* setup the device struct */ + device = g_new0 (ExoMountHalDevice, 1); +- device->udi = g_strdup (udi); ++ device->udi = udi; + + /* check if we have a volume here */ + device->volume = libhal_volume_from_udi (hal_context, udi); +@@ -269,8 +307,8 @@ err1: g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("Given device \"% + if (G_UNLIKELY (device->file == NULL || device->name == NULL)) + { + exo_mount_hal_device_free (device); +- device = NULL; +- goto err0; ++ exo_mount_hal_propagate_error(error, &derror); ++ return NULL; + } + + /* check if we failed */ +@@ -282,11 +320,7 @@ err1: g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, _("Given device \"% + device = NULL; + } + +-out: +- /* cleanup */ +- libhal_free_string_array (interfaces); +- g_free (volume_udi); +- ++ dbus_error_free (&derror); + return device; + } + +@@ -313,7 +347,7 @@ exo_mount_hal_device_from_file (const gchar *file, + gchar **interfaces; + gchar **udis; + gint n_udis; +- gint n, m; ++ gint n; + + g_return_val_if_fail (g_path_is_absolute (file), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); +@@ -347,12 +381,7 @@ exo_mount_hal_device_from_file (const gchar *file, + continue; + + /* check if we have a mountable device here */ +- for (m = 0; interfaces[m] != NULL; ++m) +- if (strcmp (interfaces[m], "org.freedesktop.Hal.Device.Volume") == 0) +- break; +- +- /* check if it's a usable device */ +- if (interfaces[m] != NULL) ++ if (string_in_list (interfaces, "org.freedesktop.Hal.Device.Volume")) + { + libhal_free_string_array (interfaces); + break; |