rpm/nosource.diff
OBS User autobuild b4494b17ad Accepting request 37534 from Base:System
Copy from Base:System/rpm based on submit request 37534 from user mlschroe

OBS-URL: https://build.opensuse.org/request/show/37534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=96
2010-04-13 19:06:36 +00:00

37 lines
1.2 KiB
Diff

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);
}
}