rpm/rpm-4.5.90-archivesize.patch
2008-08-13 06:56:06 +00:00

31 lines
1021 B
Diff

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