summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpm-py-init.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-py-init.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
new file mode 100644
index 0000000000..07d407d36a
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
@@ -0,0 +1,27 @@
1python/rpmmodules.c: Change the way the python module loads the RPM config
2
3In order to support the RPM_VENDOR_WINDRIVER enhancement of dynamic
4runtime relocation paths, we need to call rpmcliInit instead of
5rpmReadConfigFiles. The rpmcliInit will end up calling rpmReadConfigFiles
6after the necessary relocation processing (if enabled).
7
8Code derived from changes suggested by Paul Eggleton.
9
10Upstream-Status: Pending
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13
14Index: rpm-5.4.14/python/rpmmodule.c
15===================================================================
16--- rpm-5.4.14.orig/python/rpmmodule.c
17+++ rpm-5.4.14/python/rpmmodule.c
18@@ -392,7 +392,8 @@ void init_rpm(void)
19 if (Py_AtExit(rpm_exithook) == -1)
20 return;
21
22- rpmReadConfigFiles(NULL, NULL);
23+ const char *argv[1] = {"rpmmodule", 0};
24+ rpmcliInit(1, argv, NULL);
25
26 d = PyModule_GetDict(m);
27