public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch
@ 2008-10-30 21:19 Gilles Dartiguelongue (eva)
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Dartiguelongue (eva) @ 2008-10-30 21:19 UTC (permalink / raw
  To: gentoo-commits

eva         08/10/30 21:19:42

  Removed:              gparted-0.3.7-hal-lock.patch
  Log:
  Bump to 0.3.9, enhance copy/move partition, bug fixes and translation/documentation updates. Clean up old revisions.
  (Portage version: 2.2_rc12/cvs/Linux 2.6.24-gentoo-r8-mactel x86_64)



^ permalink raw reply	[flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch
@ 2008-06-15 18:54 Gilles Dartiguelongue (eva)
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Dartiguelongue (eva) @ 2008-06-15 18:54 UTC (permalink / raw
  To: gentoo-commits

eva         08/06/15 18:54:29

  Added:                gparted-0.3.7-hal-lock.patch
  Log:
  do not fail in absence of hal, bug #220459. more su helper sweetness, bug #220383.
  (Portage version: 2.1.5.4)

Revision  Changes    Path
1.1                  sys-block/gparted/files/gparted-0.3.7-hal-lock.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/gparted/files/gparted-0.3.7-hal-lock.patch?rev=1.1&content-type=text/plain

Index: gparted-0.3.7-hal-lock.patch
===================================================================
--- /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



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-30 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 21:19 [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch Gilles Dartiguelongue (eva)
  -- strict thread matches above, loose matches on Subject: below --
2008-06-15 18:54 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