OBS User unknown 2009-02-12 21:31:45 +00:00 committed by Git OBS Bridge
parent f4eb8e8f61
commit 19b4391da3
3 changed files with 68 additions and 1 deletions

View File

@ -0,0 +1,58 @@
From f564981d2e5f4d5daad5a6f704dfa22ffaa9cf94 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 2 Feb 2008 20:57:01 +0100
Subject: [PATCH] mkpart: Don't require a DVH partition name if it's guaranteed to fail.
The mkpart command has an undocumented feature whereby it prompts for
(interactive) or requires (-s) a partition name, *regardless* of whether
it already knows the partition type (any thing but 'logical') is
incompatible with a name.
At first I was pissed and simply #if-0'd the offending code.
But in case someone is actually relying on it, I've relented, and
merely remove the prompt/requirement when the partition table type
is "dvh" and the type of the partition in question is not "logical".
* parted/parted.c (do_mkpart):
---
parted/parted.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
Index: parted-1.8.8/parted/parted.c
===================================================================
--- parted-1.8.8.orig/parted/parted.c
+++ parted-1.8.8/parted/parted.c
@@ -1,7 +1,6 @@
/*
parted - a frontend to libparted
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2003, 2005-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -708,11 +707,21 @@ do_mkpart (PedDevice** dev)
goto error_destroy_disk;
}
+ /* This undocumented _feature_, is next to useless, at least with
+ a dvh partition table, since it makes the "mkpart" command
+ fail unconditionally for a primary partition. E.g.,
+ mkpart primary any-name xfs 4096s 5000s
+ requires the name, yet always fails, saying that only
+ logical partitions may have names.
+ If you want a name, use parted's separate "name" command. */
+
if (ped_disk_type_check_feature (disk->type,
- PED_DISK_TYPE_PARTITION_NAME))
+ PED_DISK_TYPE_PARTITION_NAME)
+ && ! (strcmp (disk->type->name, "dvh") == 0
+ && part_type != PED_PARTITION_LOGICAL))
part_name = command_line_get_word (_("Partition name?"),
- "", NULL, 1);
-
+ "", NULL, 1);
+
peek_word = command_line_peek_word ();
if (part_type == PED_PARTITION_EXTENDED
|| (peek_word && isdigit (peek_word[0]))) {

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 10 11:21:52 CET 2009 - puzel@suse.cz
- dont-require-dvh-partition-name.patch (bnc#471703)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 9 13:20:38 CET 2009 - puzel@suse.cz Mon Feb 9 13:20:38 CET 2009 - puzel@suse.cz

View File

@ -26,7 +26,7 @@ License: GPL v2 or later
Group: System/Filesystems Group: System/Filesystems
Summary: GNU partitioner Summary: GNU partitioner
Version: 1.8.8 Version: 1.8.8
Release: 99 Release: 100
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
Patch: always-resize-part.dif Patch: always-resize-part.dif
Patch1: parted-type.patch Patch1: parted-type.patch
@ -53,6 +53,7 @@ Patch61: fix-multipath-part-name.patch
Patch62: fix-error-informing-the-kernel.patch Patch62: fix-error-informing-the-kernel.patch
Patch63: do-not-discard-bootcode-in-extended-partition.patch Patch63: do-not-discard-bootcode-in-extended-partition.patch
Patch64: parted-cmd-arg-fix.patch Patch64: parted-cmd-arg-fix.patch
Patch65: dont-require-dvh-partition-name.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.gnu.org/software/parted/ Url: http://www.gnu.org/software/parted/
PreReq: %install_info_prereq PreReq: %install_info_prereq
@ -125,6 +126,7 @@ Authors:
%patch62 -p1 %patch62 -p1
%patch63 -p1 %patch63 -p1
%patch64 -p1 %patch64 -p1
%patch65 -p1
%build %build
AUTOPOINT=true autoreconf --force --install AUTOPOINT=true autoreconf --force --install
@ -169,6 +171,8 @@ rm -rf "$RPM_BUILD_ROOT"
%{_libdir}/*.so %{_libdir}/*.so
%changelog %changelog
* Tue Feb 10 2009 puzel@suse.cz
- dont-require-dvh-partition-name.patch (bnc#471703)
* Mon Feb 09 2009 puzel@suse.cz * Mon Feb 09 2009 puzel@suse.cz
- parted-cmd-arg-fix.patch (bnc#473207) - parted-cmd-arg-fix.patch (bnc#473207)
* Fri Jan 23 2009 puzel@suse.cz * Fri Jan 23 2009 puzel@suse.cz