RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/python/ rpmmodule.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Tue 05 Feb 2008 - 18:44:17 CET
Message-Id: <20080205174417.170CB34845B@rpm5.org>
  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:44:17
  Branch: HEAD                             Handle: 2008020517441600

  Modified files:
    rpm                     CHANGES
    rpm/python              rpmmodule.c

  Log:
    - jbj: fix: python: re-add rpm.archscore() for smart depsolving usage.

  Summary:
    Revision    Changes     Path
    1.2137      +1  -0      rpm/CHANGES
    1.163       +19 -0      rpm/python/rpmmodule.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2136 -r1.2137 CHANGES
  --- rpm/CHANGES	5 Feb 2008 14:23:08 -0000	1.2136
  +++ rpm/CHANGES	5 Feb 2008 17:44:16 -0000	1.2137
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.1a1:
  +    - jbj: fix: python: re-add rpm.archscore() for smart depsolving usage.
       - jbj: test for POPT earlier to avoid popt being blamed for neon configure failures.
       - jbj: add --with-uuid=external, --with-pcre=external to devtool "system".
       - rse: ensure that RPM Lua function util.rsplit("", ...) returns an empty table
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/python/rpmmodule.c
  ============================================================================
  $ cvs diff -u -r1.162 -r1.163 rpmmodule.c
  --- rpm/python/rpmmodule.c	11 Dec 2007 17:06:55 -0000	1.162
  +++ rpm/python/rpmmodule.c	5 Feb 2008 17:44:16 -0000	1.163
  @@ -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:44:17 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.