- add armv3l arch.
CVS patchset: 4795
CVS date: 2001/05/16 19:19:15
- harden rpmdb iterators from damaged header instance segfaults.
- add cron/logrotate scripts to save installed package filenames.
- upgrade to db-3.3.4.
+ - fix: filter duplicate package removals (#35828).
+ - add armv3l arch.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
# XXX Add internal libtool dependence
install-data-local:
@cd $(DESTDIR)/$(libdir) && \
- sed -e "s|^dependency_libs='|& -lrpmdb -lrpmio|" < librpm.la > .librpm.la && \
+ sed -e "s|^dependency_libs='|& -lrpmdb -lrpmio -lpopt|" < librpm.la > .librpm.la && \
mv .librpm.la librpm.la
tagtable.c: rpmlib.h
p->fd = (fd != NULL ? fdLink(fd, "alAddPackage") : NULL);
if (relocs) {
- for (i = 0, r = relocs; r->oldPath || r->newPath; i++, r++);
- p->relocs = xmalloc(sizeof(*p->relocs) * (i + 1));
+ for (i = 0, r = relocs; r->oldPath || r->newPath; i++, r++)
+ ;
+ p->relocs = xmalloc((i + 1) * sizeof(*p->relocs));
for (i = 0, r = relocs; r->oldPath || r->newPath; i++, r++) {
p->relocs[i].oldPath = r->oldPath ? xstrdup(r->oldPath) : NULL;
static void removePackage(rpmTransactionSet ts, int dboffset, int depends)
/*@modifies ts @*/
{
+ int i;
+
+ /* Filter out duplicate erasures. */
+ if (ts->removedPackages != NULL)
+ for (i = 0; i < ts->numRemovedPackages; i++)
+ if (dboffset == ts->removedPackages[i]) return;
+
if (ts->numRemovedPackages == ts->allocedRemovedPackages) {
ts->allocedRemovedPackages += ts->delta;
ts->removedPackages = xrealloc(ts->removedPackages,
}
#ifndef DYING
- { const char * rcProvidesString;
+ { static /*@observer@*/ const char noProvidesString[] = "nada";
+ static /*@observer@*/ const char * rcProvidesString = noProvidesString;
const char * start;
int i;
- if (!(keyFlags & RPMSENSE_SENSEMASK) &&
- (rcProvidesString = rpmGetVar(RPMVAR_PROVIDES))) {
+ if (rcProvidesString == noProvidesString)
+ rcProvidesString = rpmGetVar(RPMVAR_PROVIDES);
+
+ if (rcProvidesString != NULL && !(keyFlags & RPMSENSE_SENSEMASK)) {
i = strlen(keyName);
- /*@-nullpass -observertrans -mayaliasunique@*/
+ /*@-observertrans -mayaliasunique@*/
while ((start = strstr(rcProvidesString, keyName))) {
- /*@=nullpass =observertrans =mayaliasunique@*/
+ /*@=observertrans =mayaliasunique@*/
if (xisspace(start[i]) || start[i] == '\0' || start[i] == ',') {
rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (rpmrc provides)\n"),
keyType, keyDepend+2);
* the new package. This would be easier if we could sort the
* addedPackages array, but we store indexes into it in various places.
*/
- orderList = xmalloc(sizeof(*orderList) * npkgs);
+ orderList = xmalloc(npkgs * sizeof(*orderList));
for (i = 0, j = 0; i < ts->orderCount; i++) {
if (ts->order[i].type == TR_ADDED) {
orderList[j].alIndex = ts->order[i].u.addedIndex;
qsort(orderList, npkgs, sizeof(*orderList), orderListIndexCmp);
- newOrder = xmalloc(sizeof(*newOrder) * ts->orderCount);
+ newOrder = xmalloc(ts->orderCount * sizeof(*newOrder));
for (i = 0, newOrderCount = 0; i < orderingCount; i++) {
struct orderListIndex * needle, key;
break;
case FA_SAVE:
-fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
assert(fi->type == TR_ADDED);
fsm->osuffix = SUFFIX_RPMSAVE;
break;
}
/* Insure that there are no memcpy underruns/overruns. */
+#if 0
assert(((char *)pe) == dataStart);
assert((((char *)ei)+len) == te);
+#else
+ if (((char *)pe) != dataStart) goto errxit;
+ if ((((char *)ei)+len) != te) goto errxit;
+#endif
if (lengthPtr)
*lengthPtr = len;
errxit:
/*@-usereleased@*/
- if (ei) {
+ if (ei)
free(ei);
- ei = NULL;
- }
+ ei = NULL;
/*@=usereleased@*/
return (void *) ei;
}
}
/* ... DB_RDONLY maps dphome perms across files ... */
- oflags |= DB_RDONLY;
+ if (dbi->dbi_temporary) {
+ oflags |= DB_CREATE;
+ dbi->dbi_oeflags |= DB_CREATE;
+ oflags &= ~DB_RDONLY;
+ dbi->dbi_oflags &= ~DB_RDONLY;
+ } else {
+ oflags |= DB_RDONLY;
+ /* ... and DB_WRITECURSOR won't be needed ... */
+ dbi->dbi_oflags |= DB_RDONLY;
+ }
- /* ... and DB_WRITECURSOR won't be needed ... */
- dbi->dbi_oflags |= DB_RDONLY;
} else { /* dbhome is writable, check for persistent dbenv. */
const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL);
#/*! \page config_rpmrc Default configuration: /usr/lib/rpm/rpmrc
# \verbatim
#
-# $Id: rpmrc.in,v 2.36 2001/05/11 17:18:16 jbj Exp $
+# $Id: rpmrc.in,v 2.37 2001/05/16 19:19:15 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
optflags: hppa2.0 -O2 -mpa-risc-1-0
optflags: mipseb -O2
optflags: mipsel -O2
-optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer
-optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer
+optflags: armv3l -O2 -fsigned-char -fomit-frame-pointer -march=armv3
+optflags: armv4b -O2 -fsigned-char -fomit-frame-pointer -march=armv4
+optflags: armv4l -O2 -fsigned-char -fomit-frame-pointer -march=armv4
optflags: atarist -O2 -fomit-frame-pointer
optflags: atariste -O2 -fomit-frame-pointer
optflags: ataritt -O2 -fomit-frame-pointer
arch_canon: sun4u: sparc64 10
arch_canon: mipsel: mipsel 11
+arch_canon: armv3l: armv3l 12
arch_canon: armv4b: armv4b 12
arch_canon: armv4l: armv4l 12
arch_compat: parisc: noarch
arch_compat: armv4b: noarch
-arch_compat: armv4l: noarch
+arch_compat: armv4l: armv3l
+arch_compat: armv3l: noarch
arch_compat: atarist: m68kmint noarch
arch_compat: atariste: m68kmint noarch
buildarch_compat: ppc: noarch
buildarch_compat: mipsel: noarch
buildarch_compat: mipseb: noarch
+
+buildarch_compat: armv3l: noarch
buildarch_compat: armv4b: noarch
buildarch_compat: armv4l: noarch
+
buildarch_compat: parisc: noarch
buildarch_compat: atarist: m68kmint noarch