From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1K7xN4-00057o-P7 for garchives@archives.gentoo.org; Sun, 15 Jun 2008 18:54:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30C21E02FA; Sun, 15 Jun 2008 18:54:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E601AE02FA for ; Sun, 15 Jun 2008 18:54:33 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 90DED64FCC for ; Sun, 15 Jun 2008 18:54:33 +0000 (UTC) Received: from eva by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1K7xMz-00062s-Dv for gentoo-commits@lists.gentoo.org; Sun, 15 Jun 2008 18:54:29 +0000 From: "Gilles Dartiguelongue (eva)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, eva@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in sys-block/gparted/files: gparted-0.3.7-hal-lock.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: gparted-0.3.7-hal-lock.patch X-VCS-Directories: sys-block/gparted/files X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue Content-Type: text/plain; charset=utf8 Message-Id: Sender: Gilles Dartiguelongue Date: Sun, 15 Jun 2008 18:54:29 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7c44afa0-2f55-4a1d-981c-c6a751ef506b X-Archives-Hash: 3205690f7c3c1a4b3d84e2454c10494e 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, b= ug #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=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/gparted/= files/gparted-0.3.7-hal-lock.patch?rev=3D1.1&content-type=3Dtext/plain Index: gparted-0.3.7-hal-lock.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /var/tmp/portage/sys-block/gparted-0.3.7/work/gparted-0.3.7/gparted.i= n 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 gpartedbi= n. +# +# 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=3D324220 # +# 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-g= uidelines + # -# 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=3Dno +for k in '' `echo "$PATH" | sed 's,:, ,g'`; do + if test -x "$k/hal-lock"; then + HAVE_HAL_LOCK=3Dyes + break + fi +done =20 -hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive = \ - --run @installdir@/gpartedbin $* +# +# Use hal-lock for invocation if it exists, otherwise simply run gparte= dbin +# +if test "x$HAVE_HAL_LOCK" =3D "xyes"; then + hal-lock --interface org.freedeskdesktop.Hal.Device.Storage --exclusive= \ + --run "@installdir@/gpartedbin $*" +else + @installdir@/gpartedbin $* +fi --=20 gentoo-commits@lists.gentoo.org mailing list