File repackage-nomd5.diff of Package rpm

--- ./lib/psm.c.orig	2010-06-04 12:44:47.000000000 +0000
+++ ./lib/psm.c	2010-06-04 12:46:38.000000000 +0000
@@ -1332,6 +1332,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
 	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
 
 	if (psm->goal == PSM_PKGINSTALL) {
+	    rpmtransFlags oldtsflags;
 
 	    if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)	break;
 
@@ -1358,6 +1359,9 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
 		break;
 	    }
 
+	    oldtsflags = rpmtsFlags(ts);
+	    if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
+		(void) rpmtsSetFlags(ts, oldtsflags | RPMTRANS_FLAG_NOMD5);
 	    rc = fsmSetup(rpmfiFSM(fi), FSM_PKGINSTALL, ts, psm->te, fi,
 			psm->cfd, NULL, &psm->failedFile);
 	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS),
@@ -1365,6 +1369,8 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s
 	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST),
 			fdOp(psm->cfd, FDSTAT_DIGEST));
 	    xx = fsmTeardown(rpmfiFSM(fi));
+	    if (headerIsEntry(fi->h, RPMTAG_REMOVETID))
+		(void) rpmtsSetFlags(ts, oldtsflags);
 
 	    saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
 	    xx = Fclose(psm->cfd);