diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2013-08-09 17:51:30 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-13 23:06:01 +0100 |
commit | c8879e23ab19af1e74c09310d33d3c7c519f63b7 (patch) | |
tree | 8f2b71c08b578c767605378c052d7f84349fd78a /meta | |
parent | bef0aabeabec03823bbe4e14381ea0f370745b9e (diff) | |
download | poky-c8879e23ab19af1e74c09310d33d3c7c519f63b7.tar.gz |
rpm: Enable compatibility with older RPM packages that have invalid platforms
Some LSB packages appear to have the platform set to '%{_target_platform}'
which is not a valid platform field. This causes a failure of the type:
warning: package lsb-test-core-4.1.15-1.x86_64 is intended for a %{_target_platform} platform
When we detect an invalid platform, fall back and try to construct a new
platform name that may be valid based on the arch and os contents of the
package. (This should only ever be needed by invalid or older RPM packages.)
(From OE-Core rev: 6513fa327aeb7e9fdd313290c205917952eed226)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch | 24 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.9.bb | 3 |
2 files changed, 26 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch new file mode 100644 index 0000000000..7101e5cbda --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Enable platform tag matching workaround in OE. | ||
2 | |||
3 | When installing some LSB packages the 'platform' field in the package | ||
4 | appears to be invalid. Instead of relying solely on the platform comparison | ||
5 | we also want to generate a perceived platform based on the valid rpm contents | ||
6 | of arch and os. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
11 | |||
12 | Index: rpm-5.4.9/lib/depends.c | ||
13 | =================================================================== | ||
14 | --- rpm-5.4.9.orig/lib/depends.c | ||
15 | +++ rpm-5.4.9/lib/depends.c | ||
16 | @@ -594,7 +594,7 @@ int rpmtsAddInstallElement(rpmts ts, Hea | ||
17 | platform = rpmExpand(arch, "-unknown-", os, NULL); | ||
18 | |||
19 | rc = rpmPlatformScore(platform, platpat, nplatpat); | ||
20 | -#if defined(RPM_VENDOR_MANDRIVA) | ||
21 | +#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) | ||
22 | /* | ||
23 | * If no match on platform tag, we'll try again with arch tag | ||
24 | * in case platform tag is inconsistent with it, which is the case | ||
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 3f4854eb6a..bd05336ba0 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb | |||
@@ -86,7 +86,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex | |||
86 | file://rpm-platform2.patch \ | 86 | file://rpm-platform2.patch \ |
87 | file://rpm-remove-sykcparse-decl.patch \ | 87 | file://rpm-remove-sykcparse-decl.patch \ |
88 | file://debugedit-segv.patch \ | 88 | file://debugedit-segv.patch \ |
89 | file://rpm-platform-file-fix.patch \ | 89 | file://rpm-platform-file-fix.patch \ |
90 | file://rpm-lsb-compatibility.patch \ | ||
90 | " | 91 | " |
91 | 92 | ||
92 | # Uncomment the following line to enable platform score debugging | 93 | # Uncomment the following line to enable platform score debugging |