blob: 200964f39d9365381afbafeb1dbca12c1e6c8975 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Don't add the first line of /etc/rpm/platform to the list of patterns
2to match when computing an arch score, use it just for getting
3information about the platform (cpu/vendor/os). Fixes #3864.
4
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005Upstream-Status: Submitted [RPM5 maintainer]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7Index: rpm-5.4.14/lib/rpmrc.c
8===================================================================
9--- rpm-5.4.14.orig/lib/rpmrc.c
10+++ rpm-5.4.14/lib/rpmrc.c
11@@ -510,6 +510,7 @@ static rpmRC rpmPlatform(const char * pl
12 #endif
13 }
14
15+#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
16 #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
17 /* do not use vendor and GNU attribution */
18 p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
19@@ -520,7 +521,8 @@ static rpmRC rpmPlatform(const char * pl
20 #endif
21 xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
22 p = _free(p);
23-
24+#endif
25+
26 init_platform++;
27 }
28 rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);