diff options
-rw-r--r-- | fsset.py | 13 | ||||
-rw-r--r-- | isys/isys.c | 14 | ||||
-rw-r--r-- | isys/isys.py | 3 | ||||
-rw-r--r-- | packages.py | 2 |
4 files changed, 29 insertions, 3 deletions
@@ -389,12 +389,22 @@ class FileSystemSet: fileSystemTypeGet("devpts"), "gid=5,mode=620") self.add(pts) + def verify (self): + for entry in self.entries: + if type(entry.__dict__) != type({}): + raise RuntimeError, "fsset internals inconsistent" + def add (self, entry): # remove any existing duplicate entries for existing in self.entries: if (existing.device.getDevice() == entry.device.getDevice() and existing.mountpoint == entry.mountpoint): self.remove(existing) + # XXX debuggin' + log ("fsset at %s\n" + "adding entry for %s\n" + "entry object %s, class __dict__ is %s", + self, entry.mountpoint, entry, isys.printObject(entry.__dict__)) self.entries.append(entry) self.entries.sort (mountCompare) @@ -697,9 +707,6 @@ class Device: self.label = None self.isSetup = 0 - def __repr__(self): - return self.device - def getComment (self): return "" diff --git a/isys/isys.c b/isys/isys.c index f2507dec9..5741ad326 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -93,6 +93,7 @@ static PyObject * doSync(PyObject * s, PyObject * args); static PyObject * doisIsoImage(PyObject * s, PyObject * args); static PyObject * dogetGeometry(PyObject * s, PyObject * args); static PyObject * getFramebufferInfo(PyObject * s, PyObject * args); +static PyObject * printObject(PyObject * s, PyObject * args); static PyMethodDef isysModuleMethods[] = { { "ejectcdrom", (PyCFunction) doEjectCdrom, METH_VARARGS, NULL }, @@ -142,6 +143,7 @@ static PyMethodDef isysModuleMethods[] = { { "isisoimage", (PyCFunction) doisIsoImage, METH_VARARGS, NULL}, { "getGeometry", (PyCFunction) dogetGeometry, METH_VARARGS, NULL}, { "fbinfo", (PyCFunction) getFramebufferInfo, METH_VARARGS, NULL}, + { "printObject", (PyCFunction) printObject, METH_VARARGS, NULL}, { NULL } } ; @@ -1528,3 +1530,15 @@ static PyObject * getFramebufferInfo(PyObject * s, PyObject * args) { return Py_BuildValue("(iii)", fb.xres, fb.yres, fb.bits_per_pixel); } +static PyObject * printObject (PyObject * o, PyObject * args) { + PyObject * obj; + char buf[256]; + + if (!PyArg_ParseTuple(args, "O", &obj)) + return NULL; + + snprintf(buf, 256, "<%s object at %lx>", obj->ob_type->tp_name, + (long) obj); + + return PyString_FromString(buf); +} diff --git a/isys/isys.py b/isys/isys.py index 2a7e73f64..761ea92d7 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -423,3 +423,6 @@ def ideCdRwList(): if dev[0:2] == 'hd': newList.append(dev) return newList + +printObject = _isys.printObject + diff --git a/packages.py b/packages.py index ce5215ce1..88bf0bd4b 100644 --- a/packages.py +++ b/packages.py @@ -305,6 +305,7 @@ def turnOnFilesystems(dir, thefsset, diskset, upgrade, instPath): thefsset.mountFilesystems (instPath) def doInstall(method, id, intf, instPath): + id.fsset.verify() if flags.test: return @@ -686,6 +687,7 @@ def doInstall(method, id, intf, instPath): w.pop () + id.fsset.verify() sys.stdout.flush() def migrateXinetd(instPath, instLog): |