teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.5.90-archivesize.patch

Panu Matilainen 05d01e
commit 9068da47a912a6983a12d1024a118c16bcb2a057
Panu Matilainen 05d01e
Author: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen 05d01e
Date:   Wed Aug 13 09:43:41 2008 +0300
Panu Matilainen 05d01e
Panu Matilainen 05d01e
    Unbreak payload size tag generation on ppc (rhbz#458817)
Panu Matilainen 05d01e
Panu Matilainen 05d01e
diff --git a/build/pack.c b/build/pack.c
Panu Matilainen 05d01e
index 41756bb..9891ae8 100644
Panu Matilainen 05d01e
--- a/build/pack.c
Panu Matilainen 05d01e
+++ b/build/pack.c
Panu Matilainen 05d01e
@@ -496,13 +496,16 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
Panu Matilainen 05d01e
 	td.tag = payloadtag;
Panu Matilainen 05d01e
 	td.count = 1;
Panu Matilainen 05d01e
 	if (payloadtag == RPMSIGTAG_PAYLOADSIZE) {
Panu Matilainen 05d01e
+	    rpm_off_t asize = csa->cpioArchiveSize;
Panu Matilainen 05d01e
 	    td.type = RPM_INT32_TYPE;
Panu Matilainen 05d01e
-	    td.data = (rpm_off_t *) &csa->cpioArchiveSize;
Panu Matilainen 05d01e
+	    td.data = &asize;
Panu Matilainen 05d01e
+	    headerPut(sig, &td, HEADERPUT_DEFAULT);
Panu Matilainen 05d01e
 	} else {
Panu Matilainen 05d01e
+	    rpm_loff_t asize = csa->cpioArchiveSize;
Panu Matilainen 05d01e
 	    td.type = RPM_INT64_TYPE;
Panu Matilainen 05d01e
-	    td.data = (rpm_loff_t *) &csa->cpioArchiveSize;
Panu Matilainen 05d01e
+	    td.data = &asize;
Panu Matilainen 05d01e
+	    headerPut(sig, &td, HEADERPUT_DEFAULT);
Panu Matilainen 05d01e
 	}
Panu Matilainen 05d01e
-	headerPut(sig, &td, HEADERPUT_DEFAULT);
Panu Matilainen 05d01e
     }
Panu Matilainen 05d01e
 
Panu Matilainen 05d01e
     /* Reallocate the signature into one contiguous region. */