diff options
author | jbj <devnull@localhost> | 2001-11-06 22:46:26 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-11-06 22:46:26 +0000 |
commit | e680cce3e8a80425586c6e2448f57a48606d220b (patch) | |
tree | 663ce322c8de2bca7fa05171e76e30d9ca80c7ab /build | |
parent | 0724785fb3a9b4d4fc1d10c6e6238b70f9752c56 (diff) | |
download | rpm-e680cce3e8a80425586c6e2448f57a48606d220b.tar.gz rpm-e680cce3e8a80425586c6e2448f57a48606d220b.tar.bz2 rpm-e680cce3e8a80425586c6e2448f57a48606d220b.zip |
- fix: harmless typo in db3 chroot hack.
- fix: big-endian's with sizeof(time_t) != sizeof(int_32) mtime broken.
- fix: add Korean message catalogs (#54473).
- add RPHNPLATFORM and PLATFORM tags.
- linear search on added package provides is dumb.
- discarding entire signature header when using --addsign is dumb.
CVS patchset: 5159
CVS date: 2001/11/06 22:46:26
Diffstat (limited to 'build')
-rw-r--r-- | build/files.c | 16 | ||||
-rw-r--r-- | build/parsePreamble.c | 3 | ||||
-rw-r--r-- | build/parseSpec.c | 15 |
3 files changed, 29 insertions, 5 deletions
diff --git a/build/files.c b/build/files.c index 45e1536b2..450761eab 100644 --- a/build/files.c +++ b/build/files.c @@ -1217,8 +1217,14 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl, &(flp->uname), 1); (void) headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE, &(flp->gname), 1); + if (sizeof(flp->fl_mtime) != sizeof(uint_32)) { + uint_32 mtime = (uint_32)flp->fl_mtime; + (void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE, + &(mtime), 1); + } else { (void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE, &(flp->fl_mtime), 1); + } if (sizeof(flp->fl_mode) != sizeof(uint_16)) { uint_16 pmode = (uint_16)flp->fl_mode; (void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE, @@ -1243,9 +1249,15 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl, (void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE, &(flp->fl_dev), 1); } -/*@=sizeoftype@*/ + if (sizeof(flp->fl_ino) != sizeof(uint_32)) { + uint_32 ino = (uint_32)flp->fl_ino; (void) headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE, - &(flp->fl_ino), 1); + &(ino), 1); + } else { + (void) headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE, + &(flp->fl_ino), 1); + } +/*@=sizeoftype@*/ (void) headerAddOrAppendEntry(h, RPMTAG_FILELANGS, RPM_STRING_ARRAY_TYPE, &(flp->langs), 1); diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 331086ad1..4ba021837 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -29,6 +29,7 @@ static rpmTag copyTagsDuringParse[] = { RPMTAG_CHANGELOGNAME, RPMTAG_CHANGELOGTEXT, RPMTAG_PREFIXES, + RPMTAG_RHNPLATFORM, 0 }; @@ -496,6 +497,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro, case RPMTAG_VERSION: case RPMTAG_RELEASE: case RPMTAG_URL: + case RPMTAG_RHNPLATFORM: SINGLE_TOKEN_ONLY; /* These macros are for backward compatibility */ if (tag == RPMTAG_VERSION) { @@ -755,6 +757,7 @@ static struct PreambleRec_s preambleList[] = { {RPMTAG_AUTOREQ, 0, 0, "autoreq"}, {RPMTAG_AUTOPROV, 0, 0, "autoprov"}, {RPMTAG_DOCDIR, 0, 0, "docdir"}, + {RPMTAG_RHNPLATFORM, 0, 0, "rhnplatform"}, /*@-nullassign@*/ /* LCL: can't add null annotation */ {0, 0, 0, 0} /*@=nullassign@*/ diff --git a/build/parseSpec.c b/build/parseSpec.c index 2835bfe54..006ab46ec 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -573,11 +573,12 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU os = myos; } #else + const char *platform = rpmExpand("%{_target_platform}", NULL); const char *arch = rpmExpand("%{_target_cpu}", NULL); const char *os = rpmExpand("%{_target_os}", NULL); #endif - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { + for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) { const char * name; (void) headerNVR(pkg->header, &name, NULL, NULL); @@ -588,11 +589,19 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU } (void) headerAddEntry(pkg->header, RPMTAG_OS, RPM_STRING_TYPE, os, 1); - (void) headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, arch, 1); - } + (void) headerAddEntry(pkg->header, RPMTAG_ARCH, + RPM_STRING_TYPE, arch, 1); + if (!headerIsEntry(pkg->header, RPMTAG_RHNPLATFORM)) + (void) headerAddEntry(pkg->header, RPMTAG_RHNPLATFORM, + RPM_STRING_TYPE, arch, 1); + (void) headerAddEntry(pkg->header, RPMTAG_PLATFORM, + RPM_STRING_TYPE, platform, 1); + } + #ifdef DYING myos = _free(myos); #else + platform = _free(platform); arch = _free(arch); os = _free(os); #endif |