diff --git a/.cvsignore b/.cvsignore index df641ac..8198c47 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -pyparted-2.5.tar.gz +pyparted-3.0.tar.gz diff --git a/pyparted-2.5-Remove-py_disk_clobber_exclude-binding.patch b/pyparted-2.5-Remove-py_disk_clobber_exclude-binding.patch deleted file mode 100644 index 4fd65ad..0000000 --- a/pyparted-2.5-Remove-py_disk_clobber_exclude-binding.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 187b7110584830c9c7ea5cfb6e720315d3ba150a Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 11 Jan 2010 13:18:21 +0100 -Subject: [PATCH] Remove py_disk_clobber_exclude binding - -py_disk_clobber_exclude has been removed from libparted-2.1, which is the -release we are targetting, so remove the binding for it. ---- - include/docstrings/pydevice.h | 6 ----- - include/pydisk.h | 1 - - include/typeobjects/pydevice.h | 2 - - src/parted/device.py | 12 ++-------- - src/pydisk.c | 41 ---------------------------------------- - 5 files changed, 3 insertions(+), 59 deletions(-) - -diff --git a/include/docstrings/pydevice.h b/include/docstrings/pydevice.h -index c581329..a837049 100644 ---- a/include/docstrings/pydevice.h -+++ b/include/docstrings/pydevice.h -@@ -112,12 +112,6 @@ PyDoc_STRVAR(disk_clobber_doc, - "Remove all identifying information from a partition table. If the partition\n" - "table cannot be cleared, a _ped.DiskException is raised."); - --PyDoc_STRVAR(disk_clobber_exclude_doc, --"clobber_exclude(self, DiskType) -> boolean\n\n" --"Remove all identifiying information from a partition table except for tables\n" --"of the given DiskType. If the partition table cannot be cleared, a\n" --"_ped.DiskException is raised."); -- - PyDoc_STRVAR(device_get_constraint_doc, - "get_constraint(self) -> Constraint\n\n" - "Get a constraint that represents hardware requirements on geometry.\n" -diff --git a/include/pydisk.h b/include/pydisk.h -index 7580634..9b9115d 100644 ---- a/include/pydisk.h -+++ b/include/pydisk.h -@@ -104,7 +104,6 @@ PyObject *py_ped_disk_type_get_next(PyObject *, PyObject *); - PyObject *py_ped_disk_type_get(PyObject *, PyObject *); - PyObject *py_ped_disk_type_check_feature(PyObject *, PyObject *); - PyObject *py_ped_disk_clobber(PyObject *, PyObject *); --PyObject *py_ped_disk_clobber_exclude(PyObject *, PyObject *); - PyObject *py_ped_disk_duplicate(PyObject *, PyObject *); - PyObject *py_ped_disk_destroy(PyObject *, PyObject *); - PyObject *py_ped_disk_commit(PyObject *, PyObject *); -diff --git a/include/typeobjects/pydevice.h b/include/typeobjects/pydevice.h -index e97f633..56a8f19 100644 ---- a/include/typeobjects/pydevice.h -+++ b/include/typeobjects/pydevice.h -@@ -158,8 +158,6 @@ static PyMethodDef _ped_Device_methods[] = { - */ - {"clobber", (PyCFunction) py_ped_disk_clobber, METH_VARARGS, - disk_clobber_doc}, -- {"clobber_exclude", (PyCFunction) py_ped_disk_clobber_exclude, -- METH_VARARGS, disk_clobber_exclude_doc}, - - /* - * These functions are in pyfilesys.c, but they work best -diff --git a/src/parted/device.py b/src/parted/device.py -index 3ab536d..87f0aa1 100644 ---- a/src/parted/device.py -+++ b/src/parted/device.py -@@ -181,15 +181,9 @@ class Device(object): - return s - - @localeC -- def clobber(self, type=None): -- """Remove all identifying signatures of the partition table. If type -- is not None, remove all identifying signatures of the partition -- table, except for partition tables of that type. type must be a -- string matching a valid key in the diskType hash.""" -- if type is None: -- return self.__device.clobber() -- else: -- return self.__device.clobber_exclude(diskType[type]) -+ def clobber(self): -+ """Remove all identifying signatures of the partition table.""" -+ return self.__device.clobber() - - @localeC - def open(self): -diff --git a/src/pydisk.c b/src/pydisk.c -index e49a57c..6ca5279 100644 ---- a/src/pydisk.c -+++ b/src/pydisk.c -@@ -651,47 +651,6 @@ PyObject *py_ped_disk_clobber(PyObject *s, PyObject *args) { - } - } - --PyObject *py_ped_disk_clobber_exclude(PyObject *s, PyObject *args) { -- PyObject *in_disktype = NULL; -- PedDevice *device = NULL; -- PedDiskType *out_disktype = NULL; -- int ret = 0; -- -- if (!PyArg_ParseTuple(args, "O!", &_ped_DiskType_Type_obj, &in_disktype)) { -- return NULL; -- } -- -- device = _ped_Device2PedDevice(s); -- if (device == NULL) { -- return NULL; -- } -- -- out_disktype = _ped_DiskType2PedDiskType(in_disktype); -- if (out_disktype == NULL) { -- return NULL; -- } -- -- ret = ped_disk_clobber_exclude(device, out_disktype); -- if (ret == 0) { -- if (partedExnRaised) { -- partedExnRaised = 0; -- -- if (!PyErr_ExceptionMatches(PartedException) && -- !PyErr_ExceptionMatches(PyExc_NotImplementedError)) -- PyErr_SetString(IOException, partedExnMessage); -- } -- else -- PyErr_Format(DiskException, "Failed to clobber partition table on device %s", device->path); -- return NULL; -- } -- -- if (ret) { -- Py_RETURN_TRUE; -- } else { -- Py_RETURN_FALSE; -- } --} -- - /* XXX: is this necessary? */ - PyObject *py_ped_disk_duplicate(PyObject *s, PyObject *args) { - PedDisk *disk = NULL, *pass_disk = NULL; --- -1.6.5.2 - diff --git a/pyparted.spec b/pyparted.spec index b74fb79..b38d206 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -2,14 +2,13 @@ Summary: Python module for GNU parted Name: pyparted -Version: 2.5 -Release: 4%{?dist} +Version: 3.0 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://fedorahosted.org/pyparted Source0: http://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz -Patch0: pyparted-2.5-Remove-py_disk_clobber_exclude-binding.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel @@ -25,7 +24,6 @@ partition tables. %prep %setup -q -%patch0 -p1 %build %configure @@ -46,6 +44,9 @@ partition tables. %{python_sitearch}/parted %changelog +* Tue Jan 12 2010 David Cantrell - 3.0-1 +- Upgrade to pyparted-3.0. + * Mon Jan 11 2010 Hans de Goede - 2.5-4 - Rebuild for new parted-2.1 - Remove py_disk_clobber_exclude function binding, as this function was diff --git a/sources b/sources index 3d89045..a8b7865 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -af74247bbe7cd13ef263f4b450d21854 pyparted-2.5.tar.gz +bb59ac54e5b4c55b853d9360992668b4 pyparted-3.0.tar.gz