summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2008-06-15 18:54:28 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2008-06-15 18:54:28 +0000
commit3efbcf51eda6b3c187bb2b225cdb946b07f790fd (patch)
treef4e085fb4238ad4f656385bff60a258bc7c8687a /sys-block
parent add xfce use flag for sys-block/gparted (diff)
downloadgentoo-2-3efbcf51eda6b3c187bb2b225cdb946b07f790fd.tar.gz
gentoo-2-3efbcf51eda6b3c187bb2b225cdb946b07f790fd.tar.bz2
gentoo-2-3efbcf51eda6b3c187bb2b225cdb946b07f790fd.zip
do not fail in absence of hal, bug #220459. more su helper sweetness, bug #220383.
(Portage version: 2.1.5.4)
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/gparted/ChangeLog9
-rw-r--r--sys-block/gparted/files/gparted-0.3.7-hal-lock.patch50
-rw-r--r--sys-block/gparted/gparted-0.3.7-r1.ebuild60
3 files changed, 118 insertions, 1 deletions
diff --git a/sys-block/gparted/ChangeLog b/sys-block/gparted/ChangeLog
index 18ff692f6d87..5fb85905d374 100644
--- a/sys-block/gparted/ChangeLog
+++ b/sys-block/gparted/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-block/gparted
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/ChangeLog,v 1.48 2008/05/04 11:43:14 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/ChangeLog,v 1.49 2008/06/15 18:54:28 eva Exp $
+
+*gparted-0.3.7-r1 (15 Jun 2008)
+
+ 15 Jun 2008; Gilles Dartiguelongue <eva@gentoo.org>
+ +files/gparted-0.3.7-hal-lock.patch, +gparted-0.3.7-r1.ebuild:
+ do not fail in absence of hal, bug #220459.
+ more su helper sweetness, bug #220383.
*gparted-0.3.7 (04 May 2008)
diff --git a/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch b/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch
new file mode 100644
index 000000000000..84d73c049c01
--- /dev/null
+++ b/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch
@@ -0,0 +1,50 @@
+--- /var/tmp/portage/sys-block/gparted-0.3.7/work/gparted-0.3.7/gparted.in 2008-04-29 16:17:29.000000000 +0200
++++ gparted.in 2008-06-15 19:21:32.000000000 +0200
+@@ -1,23 +1,35 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+-# Purpose: Acquire device locks prior to running gparted.
++# Purpose: Perform appropriate startup of GParted executable gpartedbin.
++#
++# On systems with hal-lock, use hal-lock to acquire device
++# locks prior to running gpartedbin.
+ # This is to prevent devices from being automounted.
+ # File system problems can occur if devices are mounted
+ # prior to the completion of GParted's operations.
+ # See GParted bug #324220
+ # http://bugzilla.gnome.org/show_bug.cgi?id=324220
+ #
++# On systems without hal-lock, invoke gpartedbin directly.
+ #
+-# Following is a quote from HAL 0.5.10 Specification.
+-# http://people.freedesktop.org/~david/hal-spec/hal-spec.html#locking-guidelines
++
+ #
+-# In order to prevent HAL-based automounters from mounting partitions
+-# that are being prepared, applications that access block devices
+-# directly (and pokes the kernel to reload the partitioning table)
+-# should lock out automounters by either a) obtaining the
+-# org.freedesktop.Hal.Device.Storage lock on each drive being processed;
+-# or b) obtaining the global org.freedesktop.Hal.Device.Storage lock.
++# Search PATH to determine if hal-lock program can be found
+ #
++HAVE_HAL_LOCK=no
++for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
++ if test -x "$k/hal-lock"; then
++ HAVE_HAL_LOCK=yes
++ break
++ fi
++done
+
+-hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \
+- --run @installdir@/gpartedbin $*
++#
++# Use hal-lock for invocation if it exists, otherwise simply run gpartedbin
++#
++if test "x$HAVE_HAL_LOCK" = "xyes"; then
++ hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive \
++ --run "@installdir@/gpartedbin $*"
++else
++ @installdir@/gpartedbin $*
++fi
diff --git a/sys-block/gparted/gparted-0.3.7-r1.ebuild b/sys-block/gparted/gparted-0.3.7-r1.ebuild
new file mode 100644
index 000000000000..84d56b6098fe
--- /dev/null
+++ b/sys-block/gparted/gparted-0.3.7-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/gparted/gparted-0.3.7-r1.ebuild,v 1.1 2008/06/15 18:54:28 eva Exp $
+
+inherit eutils gnome2
+
+DESCRIPTION="Gnome Partition Editor"
+HOMEPAGE="http://gparted.sourceforge.net/"
+
+SRC_URI="mirror://sourceforge/gparted/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="fat gnome hfs jfs kde ntfs reiserfs reiser4 xfs xfce"
+
+common_depends=">=sys-apps/parted-1.7.1
+ >=dev-cpp/gtkmm-2.8.0"
+
+RDEPEND="${common_depends}
+ gnome? ( x11-libs/gksu )
+ xfce? ( x11-libs/gksu )
+ kde? ( || ( kde-base/kdesu kde-base/kdebase ) )
+ fat? ( sys-fs/dosfstools )
+ ntfs? ( sys-fs/ntfsprogs )
+ hfs? ( sys-fs/hfsutils )
+ jfs? ( sys-fs/jfsutils )
+ reiserfs? ( sys-fs/reiserfsprogs )
+ reiser4? ( sys-fs/reiser4progs )
+ xfs? ( sys-fs/xfsprogs sys-fs/xfsdump )"
+
+DEPEND="${common_depends}
+ >=dev-util/pkgconfig-0.12
+ >=dev-util/intltool-0.35.5"
+
+src_unpack() {
+ gnome2_src_unpack
+
+ # HAL is not necessary, bug #220459
+ epatch "${FILESDIR}/${P}-hal-lock.patch"
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use kde; then
+ cp "${D}"/usr/share/applications/gparted.desktop \
+ "${D}"/usr/share/applications/gparted-kde.desktop
+
+ sed -i "s:Exec=:Exec=kdesu :" "${D}"/usr/share/applications/gparted-kde.desktop
+ echo "OnlyShowIn=KDE;" >> "${D}"/usr/share/applications/gparted-kde.desktop
+ fi
+
+ if use gnome || use xfce; then
+ sed -i "s:Exec=:Exec=gksu :" "${D}"/usr/share/applications/gparted.desktop
+ echo "OnlyShowIn=GNOME;XFCE;" >> "${D}"/usr/share/applications/gparted.desktop
+ else
+ echo "OnlyShowIn=X-NeverShowThis;" >> "${D}"/usr/share/applications/gparted.desktop
+ fi
+}