[Rpm-maint] Current TODO

Panu Matilainen pmatilai at redhat.com
Wed May 30 06:37:12 UTC 2007


On Tue, 29 May 2007, James Bowes wrote:

> On Tue, 29 May 2007 10:47:16 +0100, Paul Nasrat wrote:
>> 4.5 and beyond
>> --------------
>> Janitorial work:
>> - clean up old junk like workarounds of -95 era (g)libc bugs etc
>> - use glib/glibc (string manipulation, memory handling etc) facilities
>> instead
>>   of internal versions from -95 era
>> - audit and clean up user visible strings
>> - clean up the build process (auto*-stuff, compiler warnings)
>
> +1. I'm sufficiently motivated to work on RPM, but the particulars of
> how it uses the autotools are peculiar enough to stop me.

Heh, been there, seen that myself :)

>> - use mkstemp() instead of mktemp() everywhere
>> - refactor those 800+ line monster functions into something more
>> digestable
>> - split popt to separate project
>> - remove internal file/libmagic?
>> - remove internal lua?
>
> I looked at this a while ago, and it didn't seem very possible, given
> that upstream versions have moved on and changed some of the methods
> available to lua scripts. Though it would be possible if the distros
> shipping rpm shipped the external old lua as well as current lua, but
> then compiling rpm could get tricky.

Yup, externalizing Lua probably gets a bit nasty, similarly to using 
non-internal bdb would be.

>> Python:
>> - audit error handling in bindings (eg ts.addInstall() does not report
>> back
>>   failures from rpmtsAddInstallElement())
>
> It would be nice to be able to say hdr.name as well as the current
> hdr['name'] in python.

Well that's not hard, something like this:

diff -r 8a1bbb5918b9 python/header-py.c
--- a/python/header-py.c	Tue May 29 13:43:06 2007 +0300
+++ b/python/header-py.c	Wed May 30 09:33:31 2007 +0300
@@ -407,18 +407,6 @@ static struct PyMethodDef hdr_methods[]

      {NULL,		NULL}		/* sentinel */
  };
-
-static PyObject * hdr_getattro(PyObject * o, PyObject * n)
-	/*@*/
-{
-    return PyObject_GenericGetAttr(o, n);
-}
-
-static int hdr_setattro(PyObject * o, PyObject * n, PyObject * v)
-	/*@*/
-{
-    return PyObject_GenericSetAttr(o, n, v);
-}


  /** \ingroup py_c
@@ -634,6 +622,22 @@ static PyObject * hdr_subscript(hdrObjec
      }

      return o;
+}
+
+static PyObject * hdr_getattro(PyObject * o, PyObject * n)
+	/*@*/
+{
+    PyObject * res;
+    res = PyObject_GenericGetAttr(o, n);
+    if (res == NULL)
+    	res = hdr_subscript(o, n);
+    return res;
+}
+
+static int hdr_setattro(PyObject * o, PyObject * n, PyObject * v)
+	/*@*/
+{
+    return PyObject_GenericSetAttr(o, n, v);
  }

  /** \ingroup py_c



More information about the Rpm-maint mailing list