- Fix crash after refresh bug (Bug #309251, Fix by Jim Hayward)

- Fix to use realpath properly (Bug #313281, Fix by Jim Hayward)
epel8
Deji Akingunola 17 years ago
parent 6bd99b6c6a
commit 14d37b749a

@ -0,0 +1,28 @@
--- src/GParted_Core.cc 2006-12-05 14:39:31.000000000 -0500
+++ src/GParted_Core.cc.new 2007-10-30 00:29:11.000000000 -0400
@@ -487,12 +487,15 @@
while ( getline( proc_partitions, line ) )
if ( sscanf( line .c_str(), "%*d %*d %*d %255s", c_str ) == 1 )
{
+ char *real_path = NULL;
+
line = "/dev/" ;
line += c_str ;
//FIXME: it seems realpath is very unsafe to use (manpage)...
+ real_path = realpath( line .c_str(), NULL ) ;
if ( file_test( line, Glib::FILE_TEST_EXISTS ) &&
- realpath( line .c_str(), c_str ) &&
+ real_path &&
line != c_str )
{
//because we can make no assumption about which path libparted will detect
@@ -500,6 +503,8 @@
alternate_paths[ c_str ] = line ;
alternate_paths[ line ] = c_str ;
}
+ if ( real_path )
+ free( real_path ) ;
}
proc_partitions .close() ;

@ -0,0 +1,38 @@
--- include/Win_GParted.h 2006-11-25 09:56:30.000000000 -0500
+++ include/Win_GParted.h.new 2007-10-30 00:37:29.000000000 -0400
@@ -233,6 +233,7 @@
unsigned short new_count;//new_count keeps track of the new created partitions
FS fs ;
bool OPERATIONSLIST_OPEN ;
+ sigc::connection combo_devices_signal_changed_id ;
GParted_Core gparted_core ;
std::vector<Gtk::Label *> device_info ;
--- src/Win_GParted.cc 2006-12-01 08:14:23.000000000 -0500
+++ src/Win_GParted.cc.new 2007-10-30 00:35:47.000000000 -0400
@@ -260,7 +260,8 @@
combo_devices .pack_start( treeview_devices_columns .device ) ;
combo_devices .pack_start( treeview_devices_columns .size, false ) ;
- combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) );
+ combo_devices_signal_changed_id =
+ combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) );
hbox_toolbar .pack_start( combo_devices, Gtk::PACK_SHRINK ) ;
}
@@ -502,6 +503,7 @@
void Win_GParted::refresh_combo_devices()
{
+ combo_devices_signal_changed_id .block() ;
liststore_devices ->clear() ;
menu = manage( new Gtk::Menu() ) ;
@@ -538,6 +540,7 @@
menubar_main .items()[ 0 ] .get_submenu() ->items()[ 1 ] .set_submenu( *menu ) ;
}
+ combo_devices_signal_changed_id .unblock() ;
combo_devices .set_active( current_device ) ;
}

@ -1,21 +1,23 @@
Summary: Gnome Partition Editor
Name: gparted
Version: 0.3.3
Release: 12%{?dist}
Group: Applications/System
License: GPLv2+
URL: http://gparted.sourceforge.net
Source0: http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Source1: run-gparted
Source2: gparted-console.apps
Source3: gparted-pam.d
Patch0: gparted-dont-lock-hal.patch
Patch1: gparted-devices.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtkmm24-devel parted-devel
BuildRequires: e2fsprogs-devel gettext perl(XML::Parser)
BuildRequires: desktop-file-utils
Requires: hal >= 0.5.9
Summary: Gnome Partition Editor
Name: gparted
Version: 0.3.3
Release: 13%{?dist}
Group: Applications/System
License: GPLv2+
URL: http://gparted.sourceforge.net
Source0: http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Source1: run-gparted
Source2: gparted-console.apps
Source3: gparted-pam.d
Patch0: gparted-dont-lock-hal.patch
Patch1: gparted-devices.patch
Patch2: gparted-realpath-fix.patch
Patch3: gparted-refresh_crash-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtkmm24-devel parted-devel
BuildRequires: e2fsprogs-devel gettext perl(XML::Parser)
BuildRequires: desktop-file-utils
Requires: hal >= 0.5.9
%description
GParted stands for Gnome Partition Editor and is a graphical frontend to
@ -28,6 +30,8 @@ will be detected at runtime and don't require a rebuild of GParted
%setup -q
%patch0 -p0 -b .hal
%patch1 -p0 -b .devs
%patch2 -p0 -b .realpath
%patch3 -p0 -b .refresh
%build
%configure
@ -83,6 +87,10 @@ fi
%config(noreplace) %{_sysconfdir}/security/console.apps/gparted
%changelog
* Tue Oct 30 2007 Deji Akingunola <dakingun@gmail.com> - 0.3.3-13
- Fix crash after refresh bug (Bug #309251, Fix by Jim Hayward)
- Fix to use realpath properly (Bug #313281, Fix by Jim Hayward)
* Wed Aug 22 2007 Deji Akingunola <dakingun@gmail.com> - 0.3.3-12
- Rebuild

Loading…
Cancel
Save