Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 586802 Details for
Bug 825147
Please backport the reloadConfig() method from rpm 4.10's Python API
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
backport of reloadConfig() (from master)
rpm-4.9.x-Backport-the-Python-reloadConfig-method-from-rpm-4.10.patch (text/plain), 1.52 KB, created by
Mathieu Bridon
on 2012-05-25 08:45:07 UTC
(
hide
)
Description:
backport of reloadConfig() (from master)
Filename:
MIME Type:
Creator:
Mathieu Bridon
Created:
2012-05-25 08:45:07 UTC
Size:
1.52 KB
patch
obsolete
>From be897335449db909e24c723e6c212b970a1ac169 Mon Sep 17 00:00:00 2001 >From: Mathieu Bridon <bochecha@fedoraproject.org> >Date: Fri, 25 May 2012 15:37:35 +0800 >Subject: [PATCH] Backport the Python 'reloadConfig' method from rpm 4.10 > >--- > python/rpmmodule.c | 19 +++++++++++++++++++ > 1 files changed, 19 insertions(+), 0 deletions(-) > >diff --git a/python/rpmmodule.c b/python/rpmmodule.c >index 0b69d4f..5c6dcc3 100644 >--- a/python/rpmmodule.c >+++ b/python/rpmmodule.c >@@ -5,6 +5,7 @@ > #include <rpm/rpmdb.h> > #include <rpm/rpmsq.h> > #include <rpm/rpmlog.h> >+#include <rpm/rpmmacro.h> > > #include "header-py.h" > #include "rpmds-py.h" >@@ -116,6 +117,22 @@ static PyObject * doLog(PyObject * self, PyObject * args, PyObject *kwds) > Py_RETURN_NONE; > } > >+static PyObject * reloadConfig(PyObject * self, PyObject * args, PyObject *kwds) >+{ >+ const char * target = NULL; >+ char * kwlist[] = { "target", NULL }; >+ int rc; >+ >+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s", kwlist, &target)) >+ return NULL; >+ >+ rpmFreeMacros(NULL); >+ rpmFreeRpmrc(); >+ rc = rpmReadConfigFiles(NULL, target) ; >+ >+ return PyBool_FromLong(rc == 0); >+} >+ > static PyMethodDef rpmModuleMethods[] = { > { "addMacro", (PyCFunction) rpmmacro_AddMacro, METH_VARARGS|METH_KEYWORDS, > NULL }, >@@ -150,6 +167,8 @@ static PyMethodDef rpmModuleMethods[] = { > NULL }, > { "setStats", (PyCFunction) setStats, METH_O, > NULL }, >+ { "reloadConfig", (PyCFunction) reloadConfig, METH_VARARGS|METH_KEYWORDS, >+ NULL }, > > { NULL } > } ; >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 825147
: 586802