rpm/nosource.diff

37 lines
1.2 KiB
Diff
Raw Normal View History

rpm does not allow headerPutUint32 on internal tags, so use
headerPut instead. (Maybe NOSOURCE/NOPATCH should not be internal
at all, though.)
--- ./build/files.c.orig 2010-04-08 16:23:42.000000000 +0000
+++ ./build/files.c 2010-04-08 16:23:44.000000000 +0000
@@ -2088,15 +2088,25 @@ int processSourceFiles(rpmSpec spec)
if (srcPtr->flags & RPMBUILD_ISSOURCE) {
headerPutString(spec->sourceHeader, RPMTAG_SOURCE, srcPtr->source);
if (srcPtr->flags & RPMBUILD_ISNO) {
- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE,
- &srcPtr->num, 1);
+ struct rpmtd_s td;
+ rpmtdReset(&td);
+ td.tag = RPMTAG_NOSOURCE;
+ td.type = RPM_INT32_TYPE;
+ td.data = &srcPtr->num;
+ td.count = 1;
+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND);
}
}
if (srcPtr->flags & RPMBUILD_ISPATCH) {
headerPutString(spec->sourceHeader, RPMTAG_PATCH, srcPtr->source);
if (srcPtr->flags & RPMBUILD_ISNO) {
- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE,
- &srcPtr->num, 1);
+ struct rpmtd_s td;
+ rpmtdReset(&td);
+ td.tag = RPMTAG_NOPATCH;
+ td.type = RPM_INT32_TYPE;
+ td.data = &srcPtr->num;
+ td.count = 1;
+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND);
}
}