diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2016-02-23 11:28:21 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-09 17:00:27 +0000 |
commit | 007c284cb83cf5d98f3e4f605244ca6f1d46caea (patch) | |
tree | 32efe1a38e908bdc64ac59cad5f7b5e6b2d99ecf /meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch | |
parent | a27ca6da59e6939a5bbab641236f7f792c03694f (diff) | |
download | poky-007c284cb83cf5d98f3e4f605244ca6f1d46caea.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
(From OE-Core rev: ee97e53fcceabc6ef4ddc68f38c5fa0e05c5d9a8)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@ | |||
1 | Fix an issue where the PACKAGEORIGIN is not properly stored. | ||
2 | |||
3 | Restore the rpmtsCallback fdSetOpen call and related code. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
8 | |||
9 | Index: rpm/python/rpmts-py.c | ||
10 | =================================================================== | ||
11 | --- rpm.orig/python/rpmts-py.c | ||
12 | +++ rpm/python/rpmts-py.c | ||
13 | @@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm | ||
14 | Header h = (Header) hd; | ||
15 | struct rpmtsCallbackType_s * cbInfo = data; | ||
16 | PyObject * pkgObj = (PyObject *) pkgKey; | ||
17 | + PyObject * oh = NULL; | ||
18 | + const char * origin = NULL; | ||
19 | PyObject * args, * result; | ||
20 | static FD_t fd; | ||
21 | |||
22 | @@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm | ||
23 | pkgObj = Py_None; | ||
24 | Py_INCREF(pkgObj); | ||
25 | } | ||
26 | - } else | ||
27 | + } else { | ||
28 | Py_INCREF(pkgObj); | ||
29 | + /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */ | ||
30 | + if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin))) | ||
31 | + origin = NULL; | ||
32 | + /* XXX clean up the path, yum paths start "//..." */ | ||
33 | + if (origin && origin[0] == '/' && origin[1] == '/') | ||
34 | + origin++; | ||
35 | + } | ||
36 | + | ||
37 | |||
38 | PyEval_RestoreThread(cbInfo->_save); | ||
39 | |||
40 | @@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd, | ||
41 | |||
42 | fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC); | ||
43 | |||
44 | + if (origin != NULL) | ||
45 | + (void) fdSetOpen(fd, origin, 0, 0); | ||
46 | + | ||
47 | return fd; | ||
48 | } else | ||
49 | if (what == RPMCALLBACK_INST_CLOSE_FILE) { | ||