[Python-modules-commits] r9918 - in packages/pyparted/trunk/debian (3 files)

dktrkranz at users.alioth.debian.org dktrkranz at users.alioth.debian.org
Fri Oct 2 00:40:14 UTC 2009


    Date: Friday, October 2, 2009 @ 00:40:12
  Author: dktrkranz
Revision: 9918

Remove features available in Fedora's parted only

Added:
  packages/pyparted/trunk/debian/patches/no_Fedora.patch
Modified:
  packages/pyparted/trunk/debian/changelog
  packages/pyparted/trunk/debian/patches/series

Modified: packages/pyparted/trunk/debian/changelog
===================================================================
--- packages/pyparted/trunk/debian/changelog	2009-10-02 00:29:52 UTC (rev 9917)
+++ packages/pyparted/trunk/debian/changelog	2009-10-02 00:40:12 UTC (rev 9918)
@@ -9,8 +9,10 @@
   * debian/patches/lower_parted_version.patch:
     - Lower required parted version, current Debian version already fulfil
       pyparted requirements.
+  * debian/patches/no_Fedora.patch:
+    - Remove features available in Fedora's parted only.
 
- -- Luca Falavigna <dktrkranz at debian.org>  Fri, 02 Oct 2009 02:26:31 +0200
+ -- Luca Falavigna <dktrkranz at debian.org>  Fri, 02 Oct 2009 02:36:35 +0200
 
 pyparted (2.0.12-1) unstable; urgency=low
 

Added: packages/pyparted/trunk/debian/patches/no_Fedora.patch
===================================================================
--- packages/pyparted/trunk/debian/patches/no_Fedora.patch	                        (rev 0)
+++ packages/pyparted/trunk/debian/patches/no_Fedora.patch	2009-10-02 00:40:12 UTC (rev 9918)
@@ -0,0 +1,207 @@
+Description:    Remove features available in Fedora's parted only.
+Origin:         Debian
+Forwarded:      not-needed
+
+Index: pyparted-2.1.1/include/pydisk.h
+===================================================================
+--- pyparted-2.1.1.orig/include/pydisk.h	2009-10-02 02:34:44.720146648 +0200
++++ pyparted-2.1.1/include/pydisk.h	2009-10-02 02:33:43.688149128 +0200
+@@ -143,8 +143,6 @@
+ PyObject *py_ped_disk_get_partition_by_sector(PyObject *, PyObject *);
+ PyObject *py_ped_disk_extended_partition(PyObject *, PyObject *);
+ PyObject *py_ped_disk_new_fresh(PyObject *, PyObject *);
+-PyObject *py_ped_disk_align_to_cylinders_on(PyObject *, PyObject *);
+-PyObject *py_ped_disk_align_to_cylinders_toggle(PyObject *, PyObject *);
+ 
+ #endif /* PYDISK_H_INCLUDED */
+ 
+Index: pyparted-2.1.1/src/_pedmodule.c
+===================================================================
+--- pyparted-2.1.1.orig/src/_pedmodule.c	2009-10-02 02:34:45.472149569 +0200
++++ pyparted-2.1.1/src/_pedmodule.c	2009-10-02 02:33:43.688149128 +0200
+@@ -155,19 +155,6 @@
+ "will have to use the commit_to_dev() method to write the new label to\n"
+ "the disk.");
+ 
+-PyDoc_STRVAR(disk_align_to_cylinders_on_doc,
+-"disk_align_to_cylinders_on() -> boolean\n\n"
+-"Returns True if libparted is currently set to align partitions to\n"
+-"cylinder boundaries on the disk.  Returns False otherwise.");
+-
+-PyDoc_STRVAR(disk_align_to_cylinders_toggle_doc,
+-"disk_align_to_cylinders_toggle_doc() -> boolean\n\n"
+-"Toggles the align-to-cylinders setting in libparted.  The return value\n"
+-"of this function indicates success or failure of the toggle operation,\n"
+-"not the value of the align-to-cylinders setting.  You must still use\n"
+-"disk_align_to_cylinders_on() to check the current value of the setting.\n"
+-"This function returns True if it succeeds, False otherwise.");
+-
+ PyDoc_STRVAR(unit_set_default_doc,
+ "unit_set_default(Unit)\n\n"
+ "Sets the default Unit to be used by further unit_* calls.  This\n"
+@@ -244,14 +231,6 @@
+                             METH_VARARGS, partition_flag_next_doc},
+     {"disk_new_fresh", (PyCFunction) py_ped_disk_new_fresh,
+                        METH_VARARGS, disk_new_fresh_doc},
+-    {"disk_align_to_cylinders_toggle", (PyCFunction)
+-                                       py_ped_disk_align_to_cylinders_toggle,
+-                                       METH_VARARGS,
+-                                       disk_align_to_cylinders_toggle_doc},
+-    {"disk_align_to_cylinders_on", (PyCFunction)
+-                                   py_ped_disk_align_to_cylinders_on,
+-                                   METH_VARARGS,
+-                                   disk_align_to_cylinders_on_doc},
+ 
+     /* pyfilesys.c */
+     {"file_system_probe", (PyCFunction) py_ped_file_system_probe, METH_VARARGS,
+@@ -481,7 +460,6 @@
+     PyModule_AddIntConstant(m, "PARTITION_PALO", PED_PARTITION_PALO);
+     PyModule_AddIntConstant(m, "PARTITION_PREP", PED_PARTITION_PREP);
+     PyModule_AddIntConstant(m, "PARTITION_MSFT_RESERVED", PED_PARTITION_MSFT_RESERVED);
+-    PyModule_AddIntConstant(m, "PARTITION_APPLE_TV_RECOVERY", PED_PARTITION_APPLE_TV_RECOVERY);
+     PyModule_AddIntConstant(m, "PARTITION_BIOS_GRUB", PED_PARTITION_BIOS_GRUB);
+ 
+     PyModule_AddIntConstant(m, "DISK_TYPE_EXTENDED", PED_DISK_TYPE_EXTENDED);
+Index: pyparted-2.1.1/src/parted/__init__.py
+===================================================================
+--- pyparted-2.1.1.orig/src/parted/__init__.py	2009-10-02 02:34:45.184150969 +0200
++++ pyparted-2.1.1/src/parted/__init__.py	2009-10-02 02:34:40.980144778 +0200
+@@ -105,7 +105,6 @@
+ from _ped import PARTITION_PALO
+ from _ped import PARTITION_PREP
+ from _ped import PARTITION_MSFT_RESERVED
+-from _ped import PARTITION_APPLE_TV_RECOVERY
+ from _ped import PARTITION_BIOS_GRUB
+ 
+ from _ped import DISK_TYPE_EXTENDED
+@@ -294,24 +293,6 @@
+     return Disk(PedDisk=peddisk)
+ 
+ @localeC
+-def isAlignToCylinders():
+-    """Returns True if libparted is currently set to align partitions
+-       to cylinder boundaries.
+-    """
+-    from _ped import disk_align_to_cylinders_on
+-
+-    return disk_align_to_cylinders_on()
+-
+- at localeC
+-def toggleAlignToCylinders():
+-    """Toggles the align-to-cylinders setting in libparted.  You must still
+-       use the isAlignToCylinders() method to check the value.
+-    """
+-    from _ped import disk_align_to_cylinders_toggle
+-
+-    return disk_align_to_cylinders_toggle()
+-
+- at localeC
+ def version():
+     """Return a dict containing the pyparted and libparted versions."""
+     from _ped import libparted_version
+Index: pyparted-2.1.1/src/pydisk.c
+===================================================================
+--- pyparted-2.1.1.orig/src/pydisk.c	2009-10-02 02:34:44.944149194 +0200
++++ pyparted-2.1.1/src/pydisk.c	2009-10-02 02:33:43.692148667 +0200
+@@ -1881,21 +1881,5 @@
+     return (PyObject *) ret;
+ }
+ 
+-PyObject *py_ped_disk_align_to_cylinders_on(PyObject *s, PyObject *args) {
+-    if (ped_disk_align_to_cylinders_on()) {
+-        Py_RETURN_TRUE;
+-    } else {
+-        Py_RETURN_FALSE;
+-    }
+-}
+-
+-PyObject *py_ped_disk_align_to_cylinders_toggle(PyObject *s, PyObject *args) {
+-    if (ped_disk_align_to_cylinders_toggle()) {
+-        Py_RETURN_TRUE;
+-    } else {
+-        Py_RETURN_TRUE;
+-    }
+-}
+-
+ /* vim:tw=78:ts=4:et:sw=4
+  */
+Index: pyparted-2.1.1/tests/_ped/test_partition.py
+===================================================================
+--- pyparted-2.1.1.orig/tests/_ped/test_partition.py	2009-10-02 02:34:46.332148965 +0200
++++ pyparted-2.1.1/tests/_ped/test_partition.py	2009-10-02 02:30:10.288148684 +0200
+@@ -109,7 +109,6 @@
+                      _ped.PARTITION_HIDDEN, _ped.PARTITION_RAID, _ped.PARTITION_LVM,
+                      _ped.PARTITION_HPSERVICE, _ped.PARTITION_PALO,
+                      _ped.PARTITION_PREP, _ped.PARTITION_MSFT_RESERVED,
+-                     _ped.PARTITION_APPLE_TV_RECOVERY,
+                      _ped.PARTITION_BIOS_GRUB]:
+             self.assertTrue(isinstance(self._part.is_flag_available(flag), bool))
+ 
+Index: pyparted-2.1.1/tests/_ped/test_ped.py
+===================================================================
+--- pyparted-2.1.1.orig/tests/_ped/test_ped.py	2009-10-02 02:34:46.088148768 +0200
++++ pyparted-2.1.1/tests/_ped/test_ped.py	2009-10-02 02:33:43.692148667 +0200
+@@ -40,7 +40,6 @@
+                   _ped.PARTITION_LBA, _ped.PARTITION_HPSERVICE,
+                   _ped.PARTITION_PALO, _ped.PARTITION_PREP,
+                   _ped.PARTITION_MSFT_RESERVED,
+-                  _ped.PARTITION_APPLE_TV_RECOVERY,
+                   _ped.PARTITION_BIOS_GRUB]:
+             self.assertNotEquals(_ped.partition_flag_get_name(f), "", "Could not get name for flag %s" % f)
+ 
+@@ -217,16 +216,6 @@
+ 
+         self.assertRaises(IndexError, _ped.disk_type_get_next, lst[-1])
+ 
+-class DiskAlignToCylindersOnTestCase(unittest.TestCase):
+-    # TODO
+-    def runTest(self):
+-        self.fail("Unimplemented test case.")
+-
+-class DiskAlignToCylindersToggleTestCase(unittest.TestCase):
+-    # TODO
+-    def runTest(self):
+-        self.fail("Unimplemented test case.")
+-
+ class FileSystemProbeTestCase(unittest.TestCase):
+     # TODO
+     def runTest(self):
+@@ -357,8 +346,6 @@
+     suite.addTest(DeviceFreeAllTestCase())
+     suite.addTest(DiskTypeGetTestCase())
+     suite.addTest(DiskTypeGetNextTestCase())
+-    suite.addTest(DiskAlignToCylindersOnTestCase())
+-    suite.addTest(DiskAlignToCylindersToggleTestCase())
+     suite.addTest(FileSystemProbeTestCase())
+     suite.addTest(FileSystemProbeSpecificTestCase())
+     suite.addTest(FileSystemTypeGetTestCase())
+Index: pyparted-2.1.1/tests/parted/test_parted.py
+===================================================================
+--- pyparted-2.1.1.orig/tests/parted/test_parted.py	2009-10-02 02:34:45.840147942 +0200
++++ pyparted-2.1.1/tests/parted/test_parted.py	2009-10-02 02:33:43.696143256 +0200
+@@ -81,16 +81,6 @@
+             self.assert_(isinstance(disk, parted.Disk))
+             self.assertTrue(parted.diskType[disk.type] == value)
+ 
+-class IsAlignToCylindersTestCase(unittest.TestCase):
+-    def runTest(self):
+-        # TODO
+-        self.fail("Unimplemented test case.")
+-
+-class ToggleAlignToCylindersTestCase(unittest.TestCase):
+-    def runTest(self):
+-        # TODO
+-        self.fail("Unimplemented test case.")
+-
+ class VersionTestCase(unittest.TestCase):
+     def runTest(self):
+         ver = parted.version()
+@@ -105,8 +95,6 @@
+     suite.addTest(ProbeForSpecificFileSystemTestCase())
+     suite.addTest(ProbeFileSystemTestCase())
+     suite.addTest(FreshDiskTestCase())
+-    suite.addTest(IsAlignToCylindersTestCase())
+-    suite.addTest(ToggleAlignToCylindersTestCase())
+     suite.addTest(VersionTestCase())
+     return suite
+ 

Modified: packages/pyparted/trunk/debian/patches/series
===================================================================
--- packages/pyparted/trunk/debian/patches/series	2009-10-02 00:29:52 UTC (rev 9917)
+++ packages/pyparted/trunk/debian/patches/series	2009-10-02 00:40:12 UTC (rev 9918)
@@ -1,3 +1,4 @@
 python2.5_fallback.patch
 no_HashNotImplemented.patch
 lower_parted_version.patch
+no_Fedora.patch




More information about the Python-modules-commits mailing list