summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-debug-platform.patch
diff options
context:
space:
mode:
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..2eb6e0f26b
--- /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.14/lib/rpmrc.c
4===================================================================
5--- rpm-5.4.14.orig/lib/rpmrc.c
6+++ rpm-5.4.14/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_OE) /* Skip the explicit-platform */
42 #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
43 /* do not use vendor and GNU attribution */
44@@ -519,6 +528,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 #endif
52@@ -688,9 +698,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@*/