Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=220f1c1231d426de38d2fc6ca388ce09a89492c3

commit 220f1c1231d426de38d2fc6ca388ce09a89492c3
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Tue Jan 19 21:45:12 2010 +0000

gnome-mount-0.8-2-i686
*fixing hal locking when device is in fstab

diff --git a/source/gnome/gnome-mount/FrugalBuild 
b/source/gnome/gnome-mount/FrugalBuild
index e97cf53..ef88b34 100644
--- a/source/gnome/gnome-mount/FrugalBuild
+++ b/source/gnome/gnome-mount/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=gnome-mount
pkgver=0.8
-pkgrel=1
+pkgrel=2
pkgdesc="Programs for mounting, unmounting and ejecting storage devices."
url="http://www.gnome.org";
depends=('gtk+2>=2.16.2-2' 'gnome-keyring>=2.28.0' 'hal>=0.5.9' 'libbonobo' 
'libnotify>=0.4.5-2')
@@ -11,12 +11,13 @@ makedepends=('perl-xml-parser' 'intltool' 
'nautilus>=2.28.2')
groups=('gnome' 'gnome-minimal')
archs=('i686' 'x86_64' 'ppc')
source=(http://hal.freedesktop.org/releases/$pkgname-$pkgver.tar.gz \
-       gnome-mount-0.6-default-mount-options.patch)
+       gnome-mount-0.6-default-mount-options.patch fstablock.diff)
up2date="Flasttar http://hal.freedesktop.org/releases/";
_F_gnome_schemas=('/etc/gconf/schemas/gnome-mount.schemas')
Finclude gnome-scriptlet
sha1sums=('846ba178cf9009f3e32c7f55f912b3ca6b9ecedb' \
-         'f5e2d09503c12b61f33f54969256189eee2111b4')
+         'f5e2d09503c12b61f33f54969256189eee2111b4' \
+          '90248972a943b26d4ac9520faee99513dabbdb64')
Fconfopts="$Fconfopts --enable-nautilus-extension"

subpkgs=('gnome-mount-nautilus')
diff --git a/source/gnome/gnome-mount/fstablock.diff 
b/source/gnome/gnome-mount/fstablock.diff
new file mode 100644
index 0000000..c7254e0
--- /dev/null
+++ b/source/gnome/gnome-mount/fstablock.diff
@@ -0,0 +1,60 @@
+diff -p -up gnome-mount-0.8/src/gnome-mount.c.lock 
gnome-mount-0.8/src/gnome-mount.c
+--- gnome-mount-0.8/src/gnome-mount.c.lock     2008-09-15 14:39:28.000000000 
+0200
++++ gnome-mount-0.8/src/gnome-mount.c  2008-09-15 14:42:54.000000000 +0200
+@@ -1166,6 +1166,18 @@ volume_mount (const char *udi, LibHalVol
+                       char *args[3] = {MOUNT, NULL, NULL};
+                       char **envp = {NULL};
+
++                      /* don't mount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
++
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"),
+                                          device_file, mount_point_fstab);
+@@ -1738,6 +1750,17 @@ volume_unmount (const char *udi, LibHalV
+                       char *args[3] = {UMOUNT, NULL, NULL};
+                       char **envp = {NULL};
+
++                      /* don't unmount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"),
+                                          device_file, mount_point);
+@@ -1958,6 +1981,18 @@ volume_eject (const char *udi, LibHalVol
+                       char *args[3] = {"eject", NULL, NULL};
+                       char **envp = {NULL};
+
++                      /* don't mount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
++
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"),
+                                          device_file, mount_point);
+
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to