Re: Possible enumeration approach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/22/2009 09:27 AM, Chris Lumens wrote:
This is a hack that hans proposed for the parted issue.  Don't see this
causing any problems.
clumens: what do you think of this for a temporary solution for the
enumeration issue?

Applying this patch to parted in package CVS, adding the following patch
to pyparted, rebuilding both, and putting both in an updates.img fixes
the problem for me in my simple test case.

diff --git a/src/pydisk.c b/src/pydisk.c
index 82500e5..84dcbd4 100644
--- a/src/pydisk.c
+++ b/src/pydisk.c
@@ -1403,6 +1403,9 @@ PyObject *py_ped_disk_remove_partition(PyObject
*s, PyObject *args) {
          }
      }

+    if (ped_disk_enumerate_on())
+        ped_disk_toggle_do_enumerate();
+
      ret = ped_disk_remove_partition(disk, out_part);
      if (ret == 0) {
          if (partedExnRaised) {

My simple test case is a partition layout with multiple logical
partitions.  Having that as a pre-existing layout and then doing
autopart consistently fails for me.  These patches correct that.

The fix seems reasonable to me. Existing API functionality is/can-be preserved in libparted.

In pyparted, I suppose we should also expose ped_disk_toggle_do_enumerate(), but that's not critical for now.

The libparted patch has my vote.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux