<div dir="ltr">I've sent v2 of this patch with the suggested changes.<div><br></div><div>Thanks,</div><div>Bogdan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 5:42 PM, Mark Hatle <span dir="ltr"><<a href="mailto:mark.hatle@windriver.com" target="_blank">mark.hatle@windriver.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 4/23/13 8:37 AM, Bogdan Marinescu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Don't add the first line of /etc/rpm/platform to the list of patterns<br>
to match when computing an arch score, use it just for getting<br>
information about the platform (cpu/vendor/os).<br>
<br>
[YOCTO #3864]<br>
<br>
Signed-off-by: Bogdan Marinescu <<a href="mailto:bogdan.a.marinescu@intel.com" target="_blank">bogdan.a.marinescu@intel.com</a>><br>
---<br>
.../rpm/rpm/rpm-platform-file-<u></u>fix.patch | 28 ++++++++++++++++++++<br>
meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rpm_<u></u>5.4.9.bb</a> | 3 ++-<br>
2 files changed, 30 insertions(+), 1 deletion(-)<br>
create mode 100644 meta/recipes-devtools/rpm/rpm/<u></u>rpm-platform-file-fix.patch<br>
<br>
diff --git a/meta/recipes-devtools/rpm/<u></u>rpm/rpm-platform-file-fix.<u></u>patch b/meta/recipes-devtools/rpm/<u></u>rpm/rpm-platform-file-fix.<u></u>patch<br>
new file mode 100644<br>
index 0000000..3e14d4d<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/rpm/<u></u>rpm/rpm-platform-file-fix.<u></u>patch<br>
@@ -0,0 +1,28 @@<br>
+Don't add the first line of /etc/rpm/platform to the list of patterns<br>
+to match when computing an arch score, use it just for getting<br>
+information about the platform (cpu/vendor/os). Fixes #3864.<br>
+<br>
+Upstream-Status: Inappropriate [embedded specific]<br>
+<br>
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c<br>
+index e676601..e433faa 100644<br>
+--- a/lib/rpmrc.c<br>
++++ b/lib/rpmrc.c<br>
+@@ -510,17 +510,6 @@ static rpmRC rpmPlatform(const char * platform)<br>
+ #endif<br>
+ }<br>
+<br>
</blockquote>
<br></div></div>
The change below should be fine, and does address both of my concerns. (it slightly changes /etc/rpm/platform behavior, but I don't think it does so in a way that will confuse anyone.)<br>
<br>
I do suggest the patch be reworked though to conform with the upstream guidelines for "local vendor patches" Replace the following with:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+-#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */<br>
+- /* do not use vendor and GNU attribution */<br>
+- p = rpmExpand("%{_host_cpu}-%{_<u></u>host_os}", NULL);<br>
+-#else<br>
+- p = rpmExpand("%{_host_cpu}-%{_<u></u>host_vendor}-%{_host_os}",<br>
+- (cvog && *cvog->gnu ? "-" : NULL),<br>
+- (cvog ? cvog->gnu : NULL), NULL);<br>
+-#endif<br>
+- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);<br>
+- p = _free(p);<br>
+- <br>
</blockquote>
<br></div>
#if !defined(RPM_VENDOR_POKY) /* Skip the explicit-platform */<br>
#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */<div class="im"><br>
/* do not use vendor and GNU attribution */<br></div><div class="im">
p = rpmExpand("%{_host_cpu}-%{_<u></u>host_os}", NULL);<br></div>
#else<div class="im"><br>
p = rpmExpand("%{_host_cpu}-%{_<u></u>host_vendor}-%{_host_os}",<br></div><div class="im">
(cvog && *cvog->gnu ? "-" : NULL),<br></div><div class="im">
(cvog ? cvog->gnu : NULL), NULL);<br></div>
#endif<div class="im"><br>
xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);<br></div>
p = _free(p);<br>
#endif<br>
<br>
(And yes, at some point we really should change from VENDOR_POKY to VENDOR_OE or similar.. but that is the existing setting.. so we should use it for now.)<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ init_platform++;<br>
+ }<br>
+ rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);<br>
diff --git a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rp<u></u>m_5.4.9.bb</a> b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rp<u></u>m_5.4.9.bb</a><br>
index 7d2cba4..112d11d 100644<br>
--- a/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rp<u></u>m_5.4.9.bb</a><br>
+++ b/meta/recipes-devtools/rpm/<a href="http://rpm_5.4.9.bb" target="_blank">rp<u></u>m_5.4.9.bb</a><br>
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"<br>
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=<u></u>2d5025d4aa3495befef8f17206a5b0<u></u>a1"<br>
<br>
DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"<br>
-PR = "r62"<br>
+PR = "r63"<br>
<br>
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed<br>
# in order to extract the distribution SRPM into a format we can extract...<br>
@@ -86,6 +86,7 @@ SRC_URI = "<a href="http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex" target="_blank">http://www.rpm5.org/files/<u></u>rpm/rpm-5.4/rpm-5.4.9-0.<u></u>20120508.src.rpm;ex</a><br>
file://rpm-platform2.patch \<br>
file://rpm-remove-sykcparse-<u></u>decl.patch \<br>
file://debugedit-segv.patch \<br>
+ file://rpm-platform-file-fix.<u></u>patch \<br>
"<br>
<br>
# Uncomment the following line to enable platform score debugging<br>
<br>
</blockquote>
<br>
<br></div>
______________________________<u></u>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.<u></u>openembedded.org</a><br>
<a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openembedded-core</a><br>
</blockquote></div><br></div>