summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-12-11 08:09:40 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-17 17:24:52 +0000
commite1345b76c04b5a829b7219c12772bec1fb301850 (patch)
tree793cf4775df349af9db83230272ea6d7bcc8b840 /meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
parent8b671644e1fa5cb4e4d8b6b0dc26a4b08e7485b7 (diff)
downloadpoky-e1345b76c04b5a829b7219c12772bec1fb301850.tar.gz
rpm/smart: Fix runtime-relocation issues w/ RPM and Smart
Fix runtime-relocation issues with the RPM and Smart wrappers. In addition the patches were necessary to fix related problems. The changes to the includes three categories of issues: *) Incorrect pathname evaluations *) Incorrect evaluation of the /etc/rpm/platform file contents *) Confusing vendor #define checks Finally, a simple way to debug the platformScore was added as that is necessary to debug how this works and into the smart system. (From OE-Core rev: 355a621caca66ed393d36fff6be8918921cf45ae) 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/recipes-devtools/rpm/rpm/rpm-debug-platform.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
new file mode 100644
index 0000000000..25ebbdcbed
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
@@ -0,0 +1,65 @@
1Debug the platform score generation...
2
3Index: rpm-5.4.9/lib/rpmrc.c
4===================================================================
5--- rpm-5.4.9.orig/lib/rpmrc.c
6+++ rpm-5.4.9/lib/rpmrc.c
7@@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl
8
9 rc = (rpmRC) rpmiobSlurp(platform, &iob);
10
11+ fprintf(stderr, "D: rpmPlatform file %s\n", platform);
12+
13 if (rc || iob == NULL) {
14 rc = RPMRC_FAIL;
15 goto exit;
16@@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl
17 while (--t > p && xisspace(*t))
18 *t = '\0';
19 if (t > p) {
20+ fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p);
21 xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre);
22 }
23 continue;
24@@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl
25 _gnu = rpmExpand("-", cvog->gnu, NULL);
26
27 addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
28+ fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n",
29+ rpmExpand("%{_platform_cpu}", NULL),
30+ rpmExpand("%{_platform_vendor}", NULL),
31+ rpmExpand("%{_platform_os}", NULL),
32+ rpmExpand("%{_platform_gnu}", NULL));
33 #else
34 addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
35 addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
36@@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl
37 #endif
38 }
39
40+ fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p);
41 #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
42 /* do not use vendor and GNU attribution */
43 p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
44@@ -518,6 +527,7 @@ static rpmRC rpmPlatform(const char * pl
45 (cvog && *cvog->gnu ? "-" : NULL),
46 (cvog ? cvog->gnu : NULL), NULL);
47 #endif
48+ fprintf(stderr, "%s\n", p);
49 xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
50 p = _free(p);
51
52@@ -686,9 +696,12 @@ int rpmPlatformScore(const char * platfo
53
54 if ((mire = (miRE) mi_re) != NULL)
55 for (i = 0; i < mi_nre; i++) {
56- if (mireRegexec(mire + i, platform, 0) >= 0)
57+ if (mireRegexec(mire + i, platform, 0) >= 0) {
58+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1);
59 return (i + 1);
60+ }
61 }
62+ fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0);
63 return 0;
64 }
65 /*@=onlytrans@*/