RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 05-Feb-2008 18:45:26
Branch: rpm-5_0 Handle: 2008020517452500
Modified files: (Branch: rpm-5_0)
rpm CHANGES TODO
rpm/python rpmmodule.c
Log:
- jbj: fix: python: re-add rpm.archscore() for smart depsolving usage.
Summary:
Revision Changes Path
1.2054.2.38 +1 -0 rpm/CHANGES
1.118.2.9 +0 -2 rpm/TODO
1.162.2.1 +19 -0 rpm/python/rpmmodule.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2054.2.37 -r1.2054.2.38 CHANGES
--- rpm/CHANGES 4 Feb 2008 21:18:32 -0000 1.2054.2.37
+++ rpm/CHANGES 5 Feb 2008 17:45:25 -0000 1.2054.2.38
@@ -1,4 +1,5 @@
5.0.1 -> 5.0.2:
+ - jbj: fix: python: re-add rpm.archscore() for smart depsolving usage.
- jbj: backport %{shrink:...} and %{getenv:...} builtin macros.
- jbj: updated sv.po (Translation Project).
- jbj: fix: permit #%patchN comments by forcing single line expansion.
@@ .
patch -p0 <<'@@ .'
Index: rpm/TODO
============================================================================
$ cvs diff -u -r1.118.2.8 -r1.118.2.9 TODO
--- rpm/TODO 1 Feb 2008 00:40:12 -0000 1.118.2.8
+++ rpm/TODO 5 Feb 2008 17:45:25 -0000 1.118.2.9
@@ -27,5 +27,3 @@
as interest, noone replied when I asked repeatedly. Alternatively,
just doing the port to rpm-5.0.0 is likely not hard at all.
- - smart (and perhaps other python apps) may need archscore method
- restored. rpmPlatformScore() is functionally equivalent replacement.
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/rpmmodule.c
============================================================================
$ cvs diff -u -r1.162 -r1.162.2.1 rpmmodule.c
--- rpm/python/rpmmodule.c 11 Dec 2007 17:06:55 -0000 1.162
+++ rpm/python/rpmmodule.c 5 Feb 2008 17:45:25 -0000 1.162.2.1
@@ -50,6 +50,22 @@
#endif
/**
+ * */
+static PyObject * archScore(PyObject * self, PyObject * args, PyObject * kwds)
+{
+ char * arch;
+ int score;
+ char * kwlist[] = {"arch", NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &arch))
+ return NULL;
+
+ score = rpmPlatformScore(arch, NULL, 0);
+
+ return Py_BuildValue("i", score);
+}
+
+/**
*/
static PyObject * signalsCaught(PyObject * self, PyObject * check)
{
@@ -179,6 +195,9 @@
{ "getMacros", (PyCFunction) rpmmacro_GetMacros, METH_VARARGS|METH_KEYWORDS,
NULL },
+ { "archscore", (PyCFunction) archScore, METH_VARARGS|METH_KEYWORDS,
+ NULL },
+
{ "signalsCaught", (PyCFunction) signalsCaught, METH_O,
NULL },
{ "checkSignals", (PyCFunction) checkSignals, METH_VARARGS,
@@ .
Received on Tue Feb 5 18:45:26 2008