aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2016-02-23 11:28:21 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 16:59:55 +0000
commitee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8 (patch)
treebf62d871484732f064894b0002fa30353a76b50b /meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
parente609c4edb211c576af35b7ac0c190dc9a7673483 (diff)
downloadopenembedded-core-contrib-ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8.tar.gz
rpm: Uprev to rpm-5.4.16 (pre) and rpm-5.4+cvs to current CVS head
meta/lib/oe/package_manager.py was also updated. This ensures that any diagnostic messages are ignored from the output of rpmresolve. The patches have been split into bug fixes (things that belong upstream) and local changes that are OE specific. The following patches are obsolete and have been removed: rpm-remove-sykcparse-decl.patch fstack-protector-configure-check.patch rpm-disable-Wno-override-init.patch rpm-lua-fix-print.patch rpm-rpmpgp-fix.patch verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
new file mode 100644
index 0000000000..e6aff52f8c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
@@ -0,0 +1,49 @@
+Fix an issue where the PACKAGEORIGIN is not properly stored.
+
+Restore the rpmtsCallback fdSetOpen call and related code.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/python/rpmts-py.c
+===================================================================
+--- rpm.orig/python/rpmts-py.c
++++ rpm/python/rpmts-py.c
+@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
+ Header h = (Header) hd;
+ struct rpmtsCallbackType_s * cbInfo = data;
+ PyObject * pkgObj = (PyObject *) pkgKey;
++ PyObject * oh = NULL;
++ const char * origin = NULL;
+ PyObject * args, * result;
+ static FD_t fd;
+
+@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
+ pkgObj = Py_None;
+ Py_INCREF(pkgObj);
+ }
+- } else
++ } else {
+ Py_INCREF(pkgObj);
++ /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
++ if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
++ origin = NULL;
++ /* XXX clean up the path, yum paths start "//..." */
++ if (origin && origin[0] == '/' && origin[1] == '/')
++ origin++;
++ }
++
+
+ PyEval_RestoreThread(cbInfo->_save);
+
+@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
+
+ fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
+
++ if (origin != NULL)
++ (void) fdSetOpen(fd, origin, 0, 0);
++
+ return fd;
+ } else
+ if (what == RPMCALLBACK_INST_CLOSE_FILE) {