diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2016-02-23 11:28:21 -0600 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2016-02-29 18:48:45 -0600 |
commit | dab553a60bc1777cf39c12670e41a3e2095156cd (patch) | |
tree | 05c807b01b09df8f60abe7490eaed76c116450d1 /meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch | |
parent | 390bad905537820f49add855c95d726b5b55c8fa (diff) | |
download | openembedded-core-contrib-dab553a60bc1777cf39c12670e41a3e2095156cd.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.patch | 49 |
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) { |