From 26545f3846419cbb2a783bed555dfb28f936df71 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Sun, 12 Apr 2009 22:39:36 +0000
Subject: [PATCH] Drop deprecated RPMTAG_RHNPLATFORM support

---
 build/parsePreamble.c |  3 ---
 build/parseSpec.c     |  3 ---
 python/header-py.c    | 16 ----------------
 3 files changed, 22 deletions(-)

diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index ec73a1b..1e1e84f 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -30,7 +30,6 @@ static rpmTag copyTagsDuringParse[] = {
     RPMTAG_CHANGELOGTEXT,
     RPMTAG_PREFIXES,
     RPMTAG_BUILDHOST,
-    RPMTAG_RHNPLATFORM,
     0
 };
 
@@ -506,7 +505,6 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro,
       case RPMTAG_VERSION:
       case RPMTAG_RELEASE:
       case RPMTAG_URL:
-      case RPMTAG_RHNPLATFORM:
 	SINGLE_TOKEN_ONLY;
 	/* These macros are for backward compatibility */
 	if (tag == RPMTAG_VERSION) {
@@ -749,7 +747,6 @@ static struct PreambleRec_s preambleList[] = {
     {RPMTAG_AUTOREQ,		0, 0, "autoreq"},
     {RPMTAG_AUTOPROV,		0, 0, "autoprov"},
     {RPMTAG_DOCDIR,		0, 0, "docdir"},
-    {RPMTAG_RHNPLATFORM,	0, 0, "rhnplatform"},
     /*@-nullassign@*/	/* LCL: can't add null annotation */
     {0, 0, 0, 0}
     /*@=nullassign@*/
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 49820d4..fc8e7ab 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -870,9 +870,6 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU
 	    headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, arch, 1);
 	else
 	    assert(pkg != spec->packages); /* noarch subpackage */
-	if (!headerIsEntry(pkg->header, RPMTAG_RHNPLATFORM))
-	    (void) headerAddEntry(pkg->header, RPMTAG_RHNPLATFORM,
-		RPM_STRING_TYPE, arch, 1);
 	(void) headerAddEntry(pkg->header, RPMTAG_PLATFORM,
 		RPM_STRING_TYPE, platform, 1);
     }
diff --git a/python/header-py.c b/python/header-py.c
index 0a78a77..4baefe7 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -362,14 +362,6 @@ static PyObject * rhnUnload(hdrObject * s, PyObject * args) {
 
     h = headerLink(s->h);
 
-    /* Retrofit a RHNPlatform: tag. */
-    if (!headerIsEntry(h, RPMTAG_RHNPLATFORM)) {
-	const char * arch;
-	int_32 at;
-	if (headerGetEntry(h, RPMTAG_ARCH, &at, (void **)&arch, NULL))
-	    headerAddEntry(h, RPMTAG_RHNPLATFORM, at, arch, 1);
-    }
-
     /* Legacy headers are forced into immutable region. */
     if (!headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) {
 	Header nh = headerReload(h, RPMTAG_HEADERIMMUTABLE);
@@ -823,14 +815,6 @@ PyObject * rhnLoad(PyObject * self, PyObject * args) {
 	return NULL;
     }
 
-    /* Retrofit a RHNPlatform: tag. */
-    if (!headerIsEntry(hdr, RPMTAG_RHNPLATFORM)) {
-	const char * arch;
-	int_32 at;
-	if (headerGetEntry(hdr, RPMTAG_ARCH, &at, (void **)&arch, NULL))
-	    headerAddEntry(hdr, RPMTAG_RHNPLATFORM, at, arch, 1);
-    }
-
     h = createHeaderObject(hdr);
 
     return (PyObject *) h;