Better handle duplicate errors.

This commit is contained in:
Joel Andres Granados Moreno 2009-07-22 10:18:08 +00:00
parent f5ead80b86
commit 7c7f37e759
2 changed files with 41 additions and 12 deletions

View File

@ -0,0 +1,24 @@
From 41bbcb45aaa89294cda404c89526aa7e251e02ca Mon Sep 17 00:00:00 2001
From: Joel Granados Moreno <jgranado@redhat.com>
Date: Wed, 22 Jul 2009 12:08:34 +0200
Subject: [PATCH] Try to handle the duplicate error a little better.
---
libparted/disk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libparted/disk.c b/libparted/disk.c
index 3656d22..8529e50 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -278,6 +278,7 @@ ped_disk_duplicate (const PedDisk* old_disk)
old_part = ped_disk_next_partition (old_disk, old_part)) {
if (ped_partition_is_active (old_part)) {
if (!_add_duplicate_part (new_disk, old_part))
+ _disk_pop_update_mode (new_disk);
goto error_destroy_new_disk;
}
}
--
1.6.0.6

View File

@ -4,7 +4,7 @@
Summary: The GNU disk partition manipulation program
Name: parted
Version: 1.9.0
Release: 4.20090721git980c%{?dist}
Release: 5.20090721git980c%{?dist}
License: GPLv3+
Group: Applications/System
URL: http://www.gnu.org/software/parted
@ -17,17 +17,18 @@ URL: http://www.gnu.org/software/parted
#
# Note that this script will give different results if master changes in upstream.
#
Source: %{name}/%{name}-%{version}.tar.gz
Patch1: %{name}-1.9.0-appletv-support.patch
Patch2: %{name}-1.9.0-extended-mbr.patch
Patch3: %{name}-1.9.0-noheaders.patch
Patch4: %{name}-1.9.0-pop-push-error.patch
Patch5: %{name}-1.9.0-no-cylinder-align.patch
Patch6: %{name}-1.9.0-swap-flag.patch
Patch7: %{name}-1.9.0-remove-struct-elem.patch
Patch8: %{name}-1.9.0-move-function-declarations.patch
Patch9: %{name}-1.9.0-dasd-duplicate.patch
Patch10: %{name}-1.9.0-new-duplicate.patch
Source: %{name}/%{name}-%{version}.tar.gz
Patch1: %{name}-1.9.0-appletv-support.patch
Patch2: %{name}-1.9.0-extended-mbr.patch
Patch3: %{name}-1.9.0-noheaders.patch
Patch4: %{name}-1.9.0-pop-push-error.patch
Patch5: %{name}-1.9.0-no-cylinder-align.patch
Patch6: %{name}-1.9.0-swap-flag.patch
Patch7: %{name}-1.9.0-remove-struct-elem.patch
Patch8: %{name}-1.9.0-move-function-declarations.patch
Patch9: %{name}-1.9.0-dasd-duplicate.patch
Patch10: %{name}-1.9.0-new-duplicate.patch
Patch11: %{name}-1.9.0-handle-dup-error.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: e2fsprogs-devel
@ -77,6 +78,7 @@ Parted library, you need to install this package.
%patch8 -p1 -b .move-function-declarations
%patch9 -p1 -b .dasd-duplicate
%patch10 -p1 -b .new-duplicate
%patch11 -p1 -b .handle-dup-error
%build
@ -135,6 +137,9 @@ fi
%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc
%changelog
* Wed Jul 22 2009 Joel Granados <jgranado@redhat.com> - 1.9.0-5.20090721git980c
- Better handle a duplicate error.
* Tue Jul 21 2009 Joel Granados <jgranado@redhat.com> - 1.9.0-4.20090721git980c
- New snapshot.
- Add patches to make dasd duplicate disk work.