From 88b8a115c0e28570341e8fba0ef5e09b8de23b309b4f12edf9cd8ff1a903e404 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 27 May 2010 15:54:16 +0000 Subject: [PATCH 1/4] fix bug#608704 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=22 --- ...align-check-work-in-interactive-mode.patch | 40 +++++++++++++++++++ parted.changes | 5 +++ parted.spec | 3 ++ 3 files changed, 48 insertions(+) create mode 100644 make-align-check-work-in-interactive-mode.patch diff --git a/make-align-check-work-in-interactive-mode.patch b/make-align-check-work-in-interactive-mode.patch new file mode 100644 index 0000000..11daf15 --- /dev/null +++ b/make-align-check-work-in-interactive-mode.patch @@ -0,0 +1,40 @@ +Index: parted-2.2/parted/parted.c +=================================================================== +--- parted-2.2.orig/parted/parted.c 2010-05-27 17:34:55.000000000 +0200 ++++ parted-2.2/parted/parted.c 2010-05-27 17:35:27.000000000 +0200 +@@ -2135,18 +2135,29 @@ do_align_check (PedDevice **dev) + { + PedDisk *disk = ped_disk_new (*dev); + if (!disk) +- return 0; ++ goto error; + +- enum AlignmentType align_type; ++ enum AlignmentType align_type = PA_OPTIMUM; + PedPartition *part = NULL; +- bool aligned = +- (command_line_get_align_type (_("alignment type(min/opt)"), &align_type) +- && command_line_get_partition (_("Partition number?"), disk, &part) +- && partition_align_check (disk, part, align_type)); ++ ++ if (!command_line_get_align_type (_("alignment type(min/opt)"), &align_type)) ++ goto error_destroy_disk; ++ if (!command_line_get_partition (_("Partition number?"), disk, &part)) ++ goto error_destroy_disk; ++ ++ bool aligned = partition_align_check (disk, part, align_type); ++ if (!opt_script_mode) ++ printf(aligned ? _("%d aligned\n") : _("%d not aligned\n"), part->num); + + ped_disk_destroy (disk); + ++ /* FIXME: perhaps we should always return 1 when in interactive mode??? */ + return aligned ? 1 : 0; ++ ++error_destroy_disk: ++ ped_disk_destroy (disk); ++error: ++ return 0; + } + + static int diff --git a/parted.changes b/parted.changes index a4b189a..48c2241 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 27 15:36:51 UTC 2010 - puzel@novell.com + +- add make-align-check-work-in-interactive-mode.patch (bnc#608704) + ------------------------------------------------------------------- Fri Apr 2 08:41:02 UTC 2010 - puzel@novell.com diff --git a/parted.spec b/parted.spec index 31efa84..c819039 100644 --- a/parted.spec +++ b/parted.spec @@ -42,6 +42,8 @@ Patch10: fix-dm-partition-name.patch Patch11: do-not-create-dm-nodes.patch #PATCH-FIX-UPSTREAM parted-remove-experimental-warning.patch Patch12: parted-remove-experimental-warning.patch +#PATCH-FIX-UPSTREAM make-align-check-work-in-interactive-mode.patch bnc#608704 petr.uzel@centrum.cz +Patch13: make-align-check-work-in-interactive-mode.patch Requires: /sbin/udevadm BuildRequires: check-devel @@ -96,6 +98,7 @@ to develop applications that require these. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build AUTOPOINT=true autoreconf --force --install From 99d0a5e346f06179843d72e0aecbdf24f21edd1277121637795349109466924e Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 28 Jun 2010 21:24:54 +0000 Subject: [PATCH 2/4] Accepting request 42154 from home:jengelh:smp Copy from home:jengelh:smp/parted via accept of submit request 42154 revision 2. Request was accepted with message: Reviewed ok OBS-URL: https://build.opensuse.org/request/show/42154 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=23 --- parted.changes | 5 +++++ parted.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/parted.changes b/parted.changes index 48c2241..1fddcb1 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de + +- use %_smp_mflags + ------------------------------------------------------------------- Thu May 27 15:36:51 UTC 2010 - puzel@novell.com diff --git a/parted.spec b/parted.spec index c819039..09cb3a8 100644 --- a/parted.spec +++ b/parted.spec @@ -108,7 +108,7 @@ AUTOPOINT=true autoreconf --force --install --enable-dynamic-loading=no \ --enable-selinux \ --disable-Werror -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install %makeinstall From b73834259b9f5e9e82ffad8dc5bbb2a08fcb9fcdf06c368f89adecd685bea211 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Wed, 30 Jun 2010 11:16:41 +0000 Subject: [PATCH 3/4] - update make-align-check-work-in-interactive-mode.patch to be consistent with upstream OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=24 --- make-align-check-work-in-interactive-mode.patch | 12 ++++++++---- parted.changes | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/make-align-check-work-in-interactive-mode.patch b/make-align-check-work-in-interactive-mode.patch index 11daf15..466cfe1 100644 --- a/make-align-check-work-in-interactive-mode.patch +++ b/make-align-check-work-in-interactive-mode.patch @@ -1,8 +1,8 @@ Index: parted-2.2/parted/parted.c =================================================================== ---- parted-2.2.orig/parted/parted.c 2010-05-27 17:34:55.000000000 +0200 -+++ parted-2.2/parted/parted.c 2010-05-27 17:35:27.000000000 +0200 -@@ -2135,18 +2135,29 @@ do_align_check (PedDevice **dev) +--- parted-2.2.orig/parted/parted.c 2010-06-30 13:10:27.000000000 +0200 ++++ parted-2.2/parted/parted.c 2010-06-30 13:11:09.000000000 +0200 +@@ -2135,18 +2135,33 @@ do_align_check (PedDevice **dev) { PedDisk *disk = ped_disk_new (*dev); if (!disk) @@ -28,9 +28,13 @@ Index: parted-2.2/parted/parted.c ped_disk_destroy (disk); -+ /* FIXME: perhaps we should always return 1 when in interactive mode??? */ ++ if (opt_script_mode) return aligned ? 1 : 0; + ++ /* Always return 1 in interactive mode, to be consistent ++ with the other modes. */ ++ return 1; ++ +error_destroy_disk: + ped_disk_destroy (disk); +error: diff --git a/parted.changes b/parted.changes index 1fddcb1..9aa8040 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 30 11:12:03 UTC 2010 - puzel@novell.com + +- update make-align-check-work-in-interactive-mode.patch to + be consistent with upstream + ------------------------------------------------------------------- Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de From 66c85df0f2019bda60b0aae67f02636e162e5b68f7a2cb14bbde6f6d0c59e6f4 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 2 Jul 2010 14:01:44 +0000 Subject: [PATCH 4/4] Updating link to change in openSUSE:Factory/parted revision 49.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=2e1628f642e4dafca8d16b5e8314ae4b --- parted.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parted.spec b/parted.spec index 09cb3a8..9a59a83 100644 --- a/parted.spec +++ b/parted.spec @@ -19,7 +19,7 @@ Name: parted Version: 2.2 -Release: 1 +Release: 2 License: GPLv3+ Summary: GNU partitioner Url: http://www.gnu.org/software/parted/