Debug the platform score generation...

Index: rpm-5.4.9/lib/rpmrc.c
===================================================================
--- rpm-5.4.9.orig/lib/rpmrc.c
+++ rpm-5.4.9/lib/rpmrc.c
@@ -465,6 +465,8 @@ static rpmRC rpmPlatform(const char * pl
 
     rc = (rpmRC) rpmiobSlurp(platform, &iob);
 
+    fprintf(stderr, "D: rpmPlatform file %s\n", platform);
+
     if (rc || iob == NULL) {
 	rc = RPMRC_FAIL;
 	goto exit;
@@ -486,6 +488,7 @@ static rpmRC rpmPlatform(const char * pl
 	    while (--t > p && xisspace(*t))
 		*t = '\0';
 	    if (t > p) {
+		fprintf(stderr, "D: rpmPlatform mireAppend REGEX %s\n", p);
 		xx = mireAppend(RPMMIRE_REGEX, 0, p, NULL, &mi_re, &mi_nre);
 	    }
 	    continue;
@@ -503,6 +506,11 @@ static rpmRC rpmPlatform(const char * pl
 		_gnu = rpmExpand("-", cvog->gnu, NULL);
 
 	    addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
+	    fprintf(stderr, "D: rpmPlatform addMacro %s-%s-%s(%s)\n",
+	    	rpmExpand("%{_platform_cpu}", NULL),
+		rpmExpand("%{_platform_vendor}", NULL),
+		rpmExpand("%{_platform_os}", NULL),
+		rpmExpand("%{_platform_gnu}", NULL));
 #else
 	    addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
 	    addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
@@ -510,6 +518,7 @@ static rpmRC rpmPlatform(const char * pl
 #endif
 	}
 
+	fprintf(stderr, "D: rpmPlatform mireAppend STRCMP %s -- ", p);
 #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
 	/* do not use vendor and GNU attribution */
 	p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
@@ -518,6 +527,7 @@ static rpmRC rpmPlatform(const char * pl
 		(cvog && *cvog->gnu ? "-" : NULL),
 		(cvog ? cvog->gnu : NULL), NULL);
 #endif
+	fprintf(stderr, "%s\n", p);
 	xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
 	p = _free(p);
 	
@@ -686,9 +696,12 @@ int rpmPlatformScore(const char * platfo
 
     if ((mire = (miRE) mi_re) != NULL)
     for (i = 0; i < mi_nre; i++) {
-	if (mireRegexec(mire + i, platform, 0) >= 0)
+	if (mireRegexec(mire + i, platform, 0) >= 0) {
+	    fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, i + 1);
 	    return (i + 1);
+	}
     }
+    fprintf(stderr, "D: rpmPlatformScore %s (%d)\n", platform, 0);
     return 0;
 }
 /*@=onlytrans@*/
