- rescusitate --rebuild.
CVS patchset: 5389 CVS date: 2002/04/11 16:55:19
This commit is contained in:
parent
bd2f1e9543
commit
2404e8d918
|
@ -10,9 +10,6 @@
|
|||
|
||||
-unrecogcomments # XXX ignore doxygen markings
|
||||
|
||||
|
||||
#-deepbreak # shortcut 485 occurences
|
||||
|
||||
+strict # lclint level
|
||||
-includenest 16 # getting deep, sigh
|
||||
|
||||
|
|
1
CHANGES
1
CHANGES
|
@ -98,6 +98,7 @@
|
|||
- use mmap when calculating file digests on verify, ~20% faster.
|
||||
- permit --dbpath and --root with signature (i.e. --import) modes.
|
||||
- beecrypt: add types.h, eliminate need for config.gnu.h.
|
||||
- rescusitate --rebuild.
|
||||
|
||||
4.0.3 -> 4.0.4:
|
||||
- solaris: translate i86pc to i386 (#57182).
|
||||
|
|
|
@ -360,7 +360,6 @@ INPUT = \
|
|||
@top_srcdir@/lib/cpio.c \
|
||||
@top_srcdir@/lib/cpio.h \
|
||||
@top_srcdir@/lib/depends.c \
|
||||
@top_srcdir@/lib/depends.h \
|
||||
@top_srcdir@/lib/formats.c \
|
||||
@top_srcdir@/lib/fs.c \
|
||||
@top_srcdir@/lib/fsm.c \
|
||||
|
|
|
@ -6,13 +6,6 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __LCLINT__
|
||||
#define ntohl(_x) (_x)
|
||||
#define ntohs(_x) (_x)
|
||||
#define htonl(_x) (_x)
|
||||
#define htons(_x) (_x)
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
|
8
build.c
8
build.c
|
@ -7,6 +7,9 @@
|
|||
#include <rpmcli.h>
|
||||
#include <rpmbuild.h>
|
||||
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "build.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -28,6 +31,8 @@ static int checkSpec(rpmTransactionSet ts, Header h)
|
|||
&& !headerIsEntry(h, RPMTAG_CONFLICTNAME))
|
||||
return 0;
|
||||
|
||||
rc = rpmtransAddPackage(ts, h, NULL, 0, NULL);
|
||||
|
||||
rc = rpmdepCheck(ts, &conflicts, &numConflicts);
|
||||
/*@-branchstate@*/
|
||||
if (rc == 0 && conflicts) {
|
||||
|
@ -38,6 +43,9 @@ static int checkSpec(rpmTransactionSet ts, Header h)
|
|||
}
|
||||
/*@=branchstate@*/
|
||||
|
||||
/* XXX nuke the added package. */
|
||||
rpmtransClean(ts);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
* @todo Eliminate, merge into rpmlib.
|
||||
*/
|
||||
|
||||
#include "psm.h"
|
||||
#include "rpmbuild.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#include <rpmio_internal.h>
|
||||
#include <rpmbuild.h>
|
||||
|
||||
#include "psm.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "buildio.h"
|
||||
|
||||
#include "myftw.h"
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
|
||||
#include <rpmio_internal.h>
|
||||
#include <rpmbuild.h>
|
||||
#include "buildio.h"
|
||||
|
||||
#include "depends.h"
|
||||
#include "psm.h"
|
||||
#include "rpmfi.h"
|
||||
|
||||
#include "buildio.h"
|
||||
|
||||
#include "legacy.h" /* XXX providePackageNVR */
|
||||
#include "signature.h"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "system.h"
|
||||
|
||||
#include "buildio.h"
|
||||
#include "rpmfi.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/*@-redecl@*/
|
||||
|
|
|
@ -17,7 +17,7 @@ pkgincdir = $(pkgincludedir)
|
|||
pkginc_HEADERS = \
|
||||
misc.h rpmcli.h rpmlib.h stringbuf.h
|
||||
noinst_HEADERS = \
|
||||
cpio.h depends.h fsm.h manifest.h psm.h \
|
||||
cpio.h fsm.h manifest.h psm.h \
|
||||
rpmal.h rpmds.h rpmfi.h rpmlead.h rpmte.h rpmts.h signature.h
|
||||
|
||||
mylibpaths = \
|
||||
|
|
|
@ -8,8 +8,11 @@
|
|||
|
||||
#include <rpmmacro.h> /* XXX rpmExpand("%{_dependency_whiteout}" */
|
||||
|
||||
#define _NEED_TEITERATOR 1
|
||||
#include "depends.h"
|
||||
#include "rpmal.h"
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "rpmdb.h" /* XXX response cache needs dbiOpen et al. */
|
||||
|
||||
|
@ -178,7 +181,7 @@ int rpmtransAddPackage(rpmTransactionSet ts, Header h,
|
|||
if (!duplicate)
|
||||
ts->orderCount++;
|
||||
|
||||
pkgKey = alAddPackage(ts->addedPackages, pkgKey, teGetKey(p),
|
||||
pkgKey = alAddPackage(&ts->addedPackages, pkgKey, teGetKey(p),
|
||||
teGetDS(p, RPMTAG_PROVIDENAME),
|
||||
teGetFI(p, RPMTAG_BASENAMES));
|
||||
if (pkgKey == RPMAL_NOMATCH) {
|
||||
|
@ -302,7 +305,7 @@ void rpmtransAvailablePackage(rpmTransactionSet ts, Header h, fnpyKey key)
|
|||
TFI_t fi = fiNew(ts, NULL, h, RPMTAG_BASENAMES, scareMem);
|
||||
|
||||
/* XXX FIXME: return code RPMAL_NOMATCH is error */
|
||||
(void) alAddPackage(ts->availablePackages, RPMAL_NOMATCH, key,
|
||||
(void) alAddPackage(&ts->availablePackages, RPMAL_NOMATCH, key,
|
||||
provides, fi);
|
||||
fi = fiFree(fi, 1);
|
||||
provides = dsFree(provides);
|
||||
|
@ -1542,6 +1545,7 @@ assert(newOrderCount == ts->orderCount);
|
|||
ts->orderAlloced = ts->orderCount;
|
||||
orderList = _free(orderList);
|
||||
|
||||
#ifdef DYING
|
||||
/* Clean up after dependency checks */
|
||||
pi = teInitIterator(ts);
|
||||
while ((p = teNextIterator(pi)) != NULL) {
|
||||
|
@ -1550,6 +1554,10 @@ assert(newOrderCount == ts->orderCount);
|
|||
pi = teFreeIterator(pi);
|
||||
|
||||
ts->addedPackages = alFree(ts->addedPackages);
|
||||
ts->numAddedPackages = 0;
|
||||
#else
|
||||
rpmtransClean(ts);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#ifndef H_DEPENDS
|
||||
#define H_DEPENDS
|
||||
|
||||
/** \ingroup rpmdep rpmtrans
|
||||
* \file lib/depends.h
|
||||
* Structures used for dependency checking.
|
||||
*/
|
||||
|
||||
#include <header.h>
|
||||
#include <rpmhash.h>
|
||||
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmal.h"
|
||||
|
||||
/*@unchecked@*/
|
||||
/*@-exportlocal@*/
|
||||
extern int _cacheDependsRC;
|
||||
/*@=exportlocal@*/
|
||||
|
||||
#include "rpmts.h"
|
||||
|
||||
/* XXX FIXME: rpmTransactionSet not opaque */
|
||||
#include "rpmte.h"
|
||||
|
||||
#ifdef DYING
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return (malloc'd) header name-version-release string.
|
||||
* @param h header
|
||||
* @retval np name tag value
|
||||
* @return name-version-release string
|
||||
*/
|
||||
/*@only@*/ char * hGetNEVR(Header h, /*@out@*/ const char ** np )
|
||||
/*@modifies *np @*/;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* H_DEPENDS */
|
|
@ -7,6 +7,11 @@
|
|||
|
||||
#include "psm.h"
|
||||
#include "rpmerr.h"
|
||||
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/*@access FD_t @*/
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <rpmio_internal.h>
|
||||
#include <rpmlib.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "misc.h" /* XXX stripTrailingChar() */
|
||||
#include "legacy.h" /* XXX providePackageNVR() and compressFileList() */
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
#include <rpmlib.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "misc.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
|
42
lib/psm.c
42
lib/psm.c
|
@ -9,7 +9,11 @@
|
|||
#include <rpmmacro.h>
|
||||
#include <rpmurl.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmal.h"
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "rpmlead.h" /* writeLead proto */
|
||||
#include "signature.h" /* signature constants */
|
||||
|
@ -28,18 +32,12 @@
|
|||
/*@access PSM_t@*/
|
||||
|
||||
/*@access TFI_t@*/
|
||||
/*@access transactionElement@*/ /* XXX rpmInstallSourcePackage */
|
||||
/*@access rpmTransactionSet@*/
|
||||
|
||||
/*@access alKey@*/
|
||||
/*@access rpmDepSet@*/
|
||||
|
||||
#ifdef DYING
|
||||
/*@-redecl -declundef -exportheadervar@*/
|
||||
/*@unchecked@*/
|
||||
extern const char * chroot_prefix;
|
||||
/*@=redecl =declundef =exportheadervar@*/
|
||||
#endif
|
||||
|
||||
int rpmVersionCompare(Header first, Header second)
|
||||
{
|
||||
const char * one, * two;
|
||||
|
@ -109,8 +107,8 @@ static struct tagMacro {
|
|||
* @return 0 always
|
||||
*/
|
||||
static int rpmInstallLoadMacros(TFI_t fi, Header h)
|
||||
/*@globals rpmGlobalMacroContext, internalState @*/
|
||||
/*@modifies rpmGlobalMacroContext, internalState @*/
|
||||
/*@globals rpmGlobalMacroContext @*/
|
||||
/*@modifies rpmGlobalMacroContext @*/
|
||||
{
|
||||
HGE_t hge = (HGE_t) fi->hge;
|
||||
struct tagMacro * tagm;
|
||||
|
@ -498,7 +496,7 @@ rpmRC rpmInstallSourcePackage(rpmTransactionSet ts, FD_t fd,
|
|||
/*@-assignexpose@*/
|
||||
fi->te = ts->order[0];
|
||||
/*@=assignexpose@*/
|
||||
/*@i@*/ fi->te->fd = fd;
|
||||
fi->te->fd = fdLink(fd, "installSourcePackage");
|
||||
hge = fi->hge;
|
||||
hfd = fi->hfd;
|
||||
|
||||
|
@ -623,12 +621,21 @@ exit:
|
|||
if (h) h = headerFree(h, "InstallSourcePackage exit");
|
||||
|
||||
/*@-branchstate@*/
|
||||
if (fi)
|
||||
if (fi) {
|
||||
if (fi->te->fd)
|
||||
(void) Fclose(fi->te->fd);
|
||||
fi->te->fd = NULL;
|
||||
fi->te = NULL;
|
||||
fi = fiFree(fi, 1);
|
||||
}
|
||||
/*@=branchstate@*/
|
||||
|
||||
psm->fi = NULL;
|
||||
psm->te = NULL;
|
||||
|
||||
/* XXX nuke the added package(s). */
|
||||
rpmtransClean(ts);
|
||||
|
||||
psm->ts = rpmtsUnlink(ts, "InstallSourcePackage");
|
||||
|
||||
return rc;
|
||||
|
@ -1586,7 +1593,7 @@ assert(psm->mi == NULL);
|
|||
rc = RPMRC_FAIL;
|
||||
break;
|
||||
}
|
||||
/*@-nullpass@*/ /* LCL: psm->fd != NULL here. */
|
||||
/*@-nullpass@*/ /* FIX: fdDup mey return NULL. */
|
||||
xx = Fflush(psm->fd);
|
||||
psm->cfd = Fdopen(fdDup(Fileno(psm->fd)), psm->rpmio_flags);
|
||||
/*@=nullpass@*/
|
||||
|
@ -1740,7 +1747,9 @@ assert(psm->mi == NULL);
|
|||
psm->what = RPMCALLBACK_CPIO_ERROR;
|
||||
psm->amount = 0;
|
||||
psm->total = 0;
|
||||
/*@-nullstate@*/ /* FIX: psm->fd may be NULL. */
|
||||
xx = psmStage(psm, PSM_NOTIFY);
|
||||
/*@=nullstate@*/
|
||||
}
|
||||
|
||||
if (fi->h && (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE))
|
||||
|
@ -1816,13 +1825,6 @@ assert(psm->mi == NULL);
|
|||
/*@=superuser@*/
|
||||
psm->chrootDone = ts->chrootDone = 1;
|
||||
if (ts->rpmdb != NULL) ts->rpmdb->db_chrootDone = 1;
|
||||
#ifdef DYING
|
||||
/*@-onlytrans@*/
|
||||
/*@-mods@*/
|
||||
chroot_prefix = ts->rootDir;
|
||||
/*@=mods@*/
|
||||
/*@=onlytrans@*/
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case PSM_CHROOT_OUT:
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
#include <rpmcli.h>
|
||||
#include <rpmbuild.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "manifest.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
|
21
lib/rpmal.c
21
lib/rpmal.c
|
@ -6,7 +6,9 @@
|
|||
|
||||
#include <rpmlib.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmal.h"
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -287,7 +289,7 @@ void alDelPackage(availableList al, alKey pkgKey)
|
|||
availablePackage alp;
|
||||
TFI_t fi;
|
||||
|
||||
if (al->list == NULL)
|
||||
if (al == NULL || al->list == NULL)
|
||||
return; /* XXX can't happen */
|
||||
|
||||
alp = al->list + pkgNum;
|
||||
|
@ -366,12 +368,19 @@ fprintf(stderr, "*** del %p[%d]\n", al->list, pkgNum);
|
|||
return;
|
||||
}
|
||||
|
||||
alKey alAddPackage(availableList al, alKey pkgKey, fnpyKey key,
|
||||
alKey alAddPackage(availableList * alistp, alKey pkgKey, fnpyKey key,
|
||||
rpmDepSet provides, TFI_t fi)
|
||||
{
|
||||
alNum pkgNum = alKey2Num(al, pkgKey);
|
||||
alNum pkgNum;
|
||||
availableList al;
|
||||
availablePackage alp;
|
||||
|
||||
/* If list doesn't exist yet, create. */
|
||||
if (*alistp == NULL)
|
||||
*alistp = alCreate(5);
|
||||
al = *alistp;
|
||||
pkgNum = alKey2Num(al, pkgKey);
|
||||
|
||||
if (pkgNum >= 0 && pkgNum < al->size) {
|
||||
alDelPackage(al, pkgKey);
|
||||
} else {
|
||||
|
@ -566,10 +575,12 @@ assert(ix < 0x10000);
|
|||
|
||||
void alMakeIndex(availableList al)
|
||||
{
|
||||
availableIndex ai = &al->index;
|
||||
availableIndex ai;
|
||||
availablePackage alp;
|
||||
int i;
|
||||
|
||||
if (al == NULL) return;
|
||||
ai = &al->index;
|
||||
if (ai->size || al->list == NULL) return;
|
||||
|
||||
for (i = 0; i < al->size; i++) {
|
||||
|
|
12
lib/rpmal.h
12
lib/rpmal.h
|
@ -13,9 +13,11 @@ typedef /*@abstract@*/ struct availableList_s * availableList;
|
|||
* @param delta no. of entries to add on each realloc
|
||||
* @return al new available list
|
||||
*/
|
||||
/*@-exportlocal@*/
|
||||
/*@only@*/
|
||||
availableList alCreate(int delta)
|
||||
/*@*/;
|
||||
/*@=exportlocal@*/
|
||||
|
||||
/**
|
||||
* Free available packages, items, and directory members.
|
||||
|
@ -32,24 +34,24 @@ availableList alFree(/*@only@*/ /*@null@*/ availableList al)
|
|||
* @param pkgKey package key
|
||||
*/
|
||||
/*@-exportlocal@*/
|
||||
void alDelPackage(availableList al, /*@null@*/ alKey pkgKey)
|
||||
void alDelPackage(/*@null@*/ availableList al, /*@null@*/ alKey pkgKey)
|
||||
/*@modifies al @*/;
|
||||
/*@=exportlocal@*/
|
||||
|
||||
/**
|
||||
* Add package to available list.
|
||||
* @param al available list
|
||||
* @param alistp address of available list
|
||||
* @param pkgKey package key, RPMAL_NOMATCH to force an append
|
||||
* @param key associated file name/python object
|
||||
* @param provides provides dependency set
|
||||
* @param fi file info set
|
||||
* @return available package index
|
||||
*/
|
||||
alKey alAddPackage(availableList al,
|
||||
alKey alAddPackage(availableList * alistp,
|
||||
/*@dependent@*/ /*@null@*/ alKey pkgKey,
|
||||
/*@dependent@*/ /*@null@*/ fnpyKey key,
|
||||
/*@null@*/ rpmDepSet provides, /*@null@*/ TFI_t fi)
|
||||
/*@modifies al, provides, fi @*/;
|
||||
/*@modifies *alistp, provides, fi @*/;
|
||||
|
||||
/**
|
||||
* Add package provides to available list index.
|
||||
|
@ -68,7 +70,7 @@ void alAddProvides(availableList al,
|
|||
* Generate index for available list.
|
||||
* @param al available list
|
||||
*/
|
||||
void alMakeIndex(availableList al)
|
||||
void alMakeIndex(/*@null@*/ availableList al)
|
||||
/*@modifies al @*/;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <rpmcli.h>
|
||||
#include "rpmpgp.h"
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "rpmlead.h"
|
||||
#include "signature.h"
|
||||
|
|
|
@ -427,16 +427,16 @@ extern int packagesTotal;
|
|||
* Install source rpm package.
|
||||
* @param ts transaction set
|
||||
* @param arg source rpm file name
|
||||
* @retval specFile address of (installed) spec file name
|
||||
* @retval specFilePtr address of (installed) spec file name
|
||||
* @retval cookie
|
||||
* @return 0 on success
|
||||
*/
|
||||
int rpmInstallSource(rpmTransactionSet ts, const char * arg,
|
||||
/*@null@*/ /*@out@*/ const char ** specFile,
|
||||
/*@null@*/ /*@out@*/ const char ** specFilePtr,
|
||||
/*@null@*/ /*@out@*/ const char ** cookie)
|
||||
/*@globals rpmGlobalMacroContext,
|
||||
fileSystem, internalState@*/
|
||||
/*@modifies ts, *specFile, *cookie, rpmGlobalMacroContext,
|
||||
/*@modifies ts, *specFilePtr, *cookie, rpmGlobalMacroContext,
|
||||
fileSystem, internalState @*/;
|
||||
|
||||
/** \ingroup rpmcli
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
|
||||
#include "fsm.h" /* XXX newFSM and CPIO_MAP_* */
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "misc.h" /* XXX stripTrailingChar */
|
||||
|
||||
#include "debug.h"
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
#include <rpmcli.h>
|
||||
|
||||
#include "depends.h" /* XXX ts->rpmdb */
|
||||
#include "rpmts.h" /* XXX ts->rpmdb */
|
||||
|
||||
#include "manifest.h"
|
||||
#include "misc.h" /* XXX for rpmGlob() */
|
||||
#include "debug.h"
|
||||
|
@ -19,8 +20,6 @@
|
|||
/*@access IDTX @*/
|
||||
/*@access IDT @*/
|
||||
|
||||
extern int _rpmio_debug;
|
||||
|
||||
/*@unchecked@*/
|
||||
static int hashesPrinted = 0;
|
||||
|
||||
|
@ -709,8 +708,6 @@ int rpmInstallSource(rpmTransactionSet ts, const char * arg,
|
|||
FD_t fd;
|
||||
int rc;
|
||||
|
||||
fprintf(stderr, "*** rpmInstallSource(%p,%s,%p,%p)\n", ts, arg, specFilePtr, cookie);
|
||||
_rpmio_debug = -1;
|
||||
fd = Fopen(arg, "r.ufdio");
|
||||
if (fd == NULL || Ferror(fd)) {
|
||||
rpmMessage(RPMMESS_ERROR, _("cannot open %s: %s\n"), arg, Fstrerror(fd));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <rpmlib.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmds.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
|
|
@ -4,9 +4,13 @@
|
|||
*/
|
||||
#include "system.h"
|
||||
|
||||
#define _NEED_TEITERATOR 1
|
||||
#include "psm.h"
|
||||
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
/*@unchecked@*/
|
||||
|
@ -455,6 +459,9 @@ transactionElement teNextIterator(teIterator tei)
|
|||
transactionElement te = NULL;
|
||||
int oc = -1;
|
||||
|
||||
if (tei == NULL || tei->ts == NULL || tei->ts->order == NULL)
|
||||
return te;
|
||||
|
||||
if (tei->reverse) {
|
||||
if (tei->oc >= 0) oc = tei->oc--;
|
||||
} else {
|
||||
|
|
|
@ -110,7 +110,6 @@ struct transactionElement_s {
|
|||
|
||||
};
|
||||
|
||||
#if defined(_NEED_TEITERATOR)
|
||||
/**
|
||||
* Iterator across transaction elements, forward on install, backward on erase.
|
||||
*/
|
||||
|
@ -121,7 +120,6 @@ struct teIterator_s {
|
|||
int ocsave; /*!< last returned iterator index. */
|
||||
int oc; /*!< iterator index. */
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -431,7 +429,6 @@ rpmDepSet teGetDS(transactionElement te, rpmTag tag)
|
|||
TFI_t teGetFI(transactionElement te, rpmTag tag)
|
||||
/*@*/;
|
||||
|
||||
#if defined(_NEED_TEITERATOR)
|
||||
/**
|
||||
* Return transaction element index.
|
||||
* @param tei transaction element iterator
|
||||
|
@ -499,8 +496,6 @@ transactionElement teNextIterator(teIterator tei)
|
|||
transactionElement teNext(teIterator tei, rpmTransactionType type)
|
||||
/*@modifies tei @*/;
|
||||
|
||||
#endif /* defined(_NEED_TEITERATOR) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
53
lib/rpmts.c
53
lib/rpmts.c
|
@ -8,8 +8,8 @@
|
|||
#include <rpmmacro.h> /* XXX rpmtsOpenDB() needs rpmGetPath */
|
||||
#include <rpmpgp.h> /* XXX rpmtransFree() needs pgpFreeDig */
|
||||
|
||||
#define _NEED_TEITERATOR 1
|
||||
#include "depends.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "rpmdb.h" /* XXX stealing db->db_mode. */
|
||||
|
||||
|
@ -102,9 +102,19 @@ char * hGetNEVR(Header h, const char ** np)
|
|||
void rpmtransClean(rpmTransactionSet ts)
|
||||
{
|
||||
if (ts) {
|
||||
HFD_t hfd = headerFreeData;
|
||||
teIterator pi; transactionElement p;
|
||||
|
||||
/* Clean up after dependency checks. */
|
||||
pi = teInitIterator(ts);
|
||||
while ((p = teNextIterator(pi)) != NULL)
|
||||
teCleanDS(p);
|
||||
pi = teFreeIterator(pi);
|
||||
|
||||
ts->addedPackages = alFree(ts->addedPackages);
|
||||
ts->numAddedPackages = 0;
|
||||
|
||||
if (ts->sig != NULL)
|
||||
ts->sig = hfd(ts->sig, ts->sigtype);
|
||||
ts->sig = headerFreeData(ts->sig, ts->sigtype);
|
||||
if (ts->dig != NULL)
|
||||
ts->dig = pgpFreeDig(ts->dig);
|
||||
}
|
||||
|
@ -124,18 +134,8 @@ rpmTransactionSet rpmtransFree(rpmTransactionSet ts)
|
|||
|
||||
(void) rpmtsCloseDB(ts);
|
||||
|
||||
for (pi = teInitIterator(ts), oc = 0; (p = teNextIterator(pi)) != NULL; oc++) {
|
||||
/*@-type -unqualifiedtrans @*/
|
||||
ts->order[oc] = teFree(ts->order[oc]);
|
||||
/*@=type =unqualifiedtrans @*/
|
||||
}
|
||||
pi = teFreeIterator(pi);
|
||||
/*@-type +voidabstract @*/ /* FIX: double indirection */
|
||||
ts->order = _free(ts->order);
|
||||
/*@=type =voidabstract @*/
|
||||
|
||||
ts->addedPackages = alFree(ts->addedPackages);
|
||||
ts->availablePackages = alFree(ts->availablePackages);
|
||||
ts->numAvailablePackages = 0;
|
||||
ts->di = _free(ts->di);
|
||||
ts->removedPackages = _free(ts->removedPackages);
|
||||
if (ts->scriptFd != NULL) {
|
||||
|
@ -146,6 +146,16 @@ rpmTransactionSet rpmtransFree(rpmTransactionSet ts)
|
|||
ts->rootDir = _free(ts->rootDir);
|
||||
ts->currDir = _free(ts->currDir);
|
||||
|
||||
for (pi = teInitIterator(ts), oc = 0; (p = teNextIterator(pi)) != NULL; oc++) {
|
||||
/*@-type -unqualifiedtrans @*/
|
||||
ts->order[oc] = teFree(ts->order[oc]);
|
||||
/*@=type =unqualifiedtrans @*/
|
||||
}
|
||||
pi = teFreeIterator(pi);
|
||||
/*@-type +voidabstract @*/ /* FIX: double indirection */
|
||||
ts->order = _free(ts->order);
|
||||
/*@=type =voidabstract @*/
|
||||
|
||||
/*@-nullstate@*/ /* FIX: partial annotations */
|
||||
rpmtransClean(ts);
|
||||
/*@=nullstate@*/
|
||||
|
@ -203,16 +213,13 @@ rpmTransactionSet rpmtransCreateSet(rpmdb db, const char * rootDir)
|
|||
ts->chrootDone = 0;
|
||||
|
||||
ts->numAddedPackages = 0;
|
||||
ts->addedPackages = alCreate(ts->delta);
|
||||
|
||||
ts->addedPackages = NULL;
|
||||
ts->numAvailablePackages = 0;
|
||||
ts->availablePackages = alCreate(ts->delta);
|
||||
|
||||
ts->orderAlloced = ts->delta;
|
||||
ts->availablePackages = NULL;
|
||||
ts->numAddedPackages = 0;
|
||||
ts->orderAlloced = 0;
|
||||
ts->orderCount = 0;
|
||||
/*@-type -abstract@*/
|
||||
ts->order = xcalloc(ts->orderAlloced, sizeof(*ts->order));
|
||||
/*@=type =abstract@*/
|
||||
ts->order = NULL;
|
||||
|
||||
ts->sig = NULL;
|
||||
ts->dig = NULL;
|
||||
|
|
10
lib/rpmts.h
10
lib/rpmts.h
|
@ -6,11 +6,19 @@
|
|||
* Structures and prototypes used for an rpmTransactionSet
|
||||
*/
|
||||
|
||||
#include <rpmhash.h> /* XXX hashTable */
|
||||
#include "rpmal.h" /* XXX availablePackage/relocateFileList ,*/
|
||||
|
||||
/*@unchecked@*/
|
||||
/*@-exportlocal@*/
|
||||
extern int _ts_debug;
|
||||
/*@=exportlocal@*/
|
||||
|
||||
/*@unchecked@*/
|
||||
/*@-exportlocal@*/
|
||||
extern int _cacheDependsRC;
|
||||
/*@=exportlocal@*/
|
||||
|
||||
/** \ingroup rpmdep
|
||||
* The set of packages to be installed/removed atomically.
|
||||
*/
|
||||
|
@ -28,7 +36,7 @@ struct rpmTransactionSet_s {
|
|||
int filesystemCount; /*!< No. of mounted filesystems. */
|
||||
/*@dependent@*/
|
||||
const char ** filesystems; /*!< Mounted filesystem names. */
|
||||
/*@only@*/
|
||||
/*@only@*/ /*@null@*/
|
||||
struct diskspaceInfo * di; /*!< Per filesystem disk/inode usage. */
|
||||
|
||||
int dbmode; /*!< Database open mode. */
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
#include <rpmmacro.h> /* XXX for rpmGetPath() */
|
||||
#include "rpmdb.h"
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "misc.h" /* XXX for dosetenv() and makeTempFile() */
|
||||
#include "legacy.h" /* XXX for mdbinfile() */
|
||||
#include "rpmlead.h"
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
|
||||
#include <rpmmacro.h> /* XXX for rpmExpand */
|
||||
|
||||
#define _NEED_TEITERATOR 1
|
||||
#include "psm.h"
|
||||
|
||||
#include "rpmds.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "rpmdb.h"
|
||||
#include "fprint.h"
|
||||
#include "legacy.h" /* XXX domd5 */
|
||||
|
|
2
lib/ts.c
2
lib/ts.c
|
@ -5,7 +5,7 @@
|
|||
#include <rpmlib.h>
|
||||
#include <rpmpgp.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
#include "system.h"
|
||||
|
||||
#include "psm.h"
|
||||
#include "rpmfi.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include <rpmcli.h>
|
||||
|
||||
#include "legacy.h" /* XXX domd5(), uidToUname(), gnameToGid */
|
||||
|
|
554
po/pt_BR.po
554
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
554
po/rpm.pot
554
po/rpm.pot
File diff suppressed because it is too large
Load Diff
|
@ -5,7 +5,10 @@
|
|||
#include "Python.h"
|
||||
#include "rpmio_internal.h"
|
||||
#include "rpmcli.h" /* XXX for rpmCheckSig */
|
||||
#include "depends.h" /* XXX for ts->rpmdb */
|
||||
|
||||
#include "rpmfi.h"
|
||||
#include "rpmts.h" /* XXX for ts->rpmdb */
|
||||
|
||||
#include "legacy.h"
|
||||
#include "misc.h"
|
||||
#include "header_internal.h"
|
||||
|
|
1623
python/rpmmodule.c
1623
python/rpmmodule.c
File diff suppressed because it is too large
Load Diff
5
rpm.spec
5
rpm.spec
|
@ -20,7 +20,7 @@ Name: rpm
|
|||
%define version 4.1
|
||||
Version: %{version}
|
||||
%{expand: %%define rpm_version %{version}}
|
||||
Release: 0.04
|
||||
Release: 0.05
|
||||
Group: System Environment/Base
|
||||
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
|
||||
Copyright: GPL
|
||||
|
@ -521,6 +521,9 @@ fi
|
|||
%{__prefix}/include/popt.h
|
||||
|
||||
%changelog
|
||||
* Thu Apr 11 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.05
|
||||
- rescusitate --rebuild.
|
||||
|
||||
* Wed Apr 10 2002 Jeff Johnsion <jbj@redhat.com> 4.1-0.04
|
||||
- beecrypt: add types.h, eliminate need for config.gnu.h.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Name: rpm
|
|||
%define version @VERSION@
|
||||
Version: %{version}
|
||||
%{expand: %%define rpm_version %{version}}
|
||||
Release: 0.04
|
||||
Release: 0.05
|
||||
Group: System Environment/Base
|
||||
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
|
||||
Copyright: GPL
|
||||
|
@ -521,6 +521,9 @@ fi
|
|||
%{__prefix}/include/popt.h
|
||||
|
||||
%changelog
|
||||
* Thu Apr 11 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.05
|
||||
- rescusitate --rebuild.
|
||||
|
||||
* Wed Apr 10 2002 Jeff Johnsion <jbj@redhat.com> 4.1-0.04
|
||||
- beecrypt: add types.h, eliminate need for config.gnu.h.
|
||||
|
||||
|
|
8
rpmqv.c
8
rpmqv.c
|
@ -278,7 +278,11 @@ static void printUsage(void)
|
|||
}
|
||||
|
||||
/*@-mods@*/ /* FIX: shrug */
|
||||
int main(int argc, const char ** argv, char ** envp)
|
||||
#if defined(__GLIBC__) || defined(__LCLINT__)
|
||||
int main(int argc, const char ** argv)
|
||||
#else
|
||||
int main(int argc, const char ** argv, /*@unused@*/ char ** envp)
|
||||
#endif
|
||||
/*@globals __assert_program_name, rpmEVR, RPMVERSION,
|
||||
rpmGlobalMacroContext, rpmCLIMacroContext,
|
||||
fileSystem, internalState@*/
|
||||
|
@ -329,7 +333,7 @@ int main(int argc, const char ** argv, char ** envp)
|
|||
#endif
|
||||
setprogname(argv[0]); /* Retrofit glibc __progname */
|
||||
|
||||
#if !defined(__GLIBC__)
|
||||
#if !defined(__GLIBC__) && !defined(__LCLINT__)
|
||||
environ = envp;
|
||||
#endif
|
||||
|
||||
|
|
2
system.h
2
system.h
|
@ -28,7 +28,7 @@ extern int chroot (const char *__path)
|
|||
/*@modifies errno, systemState @*/;
|
||||
/*@=superuser =declundef =incondefs @*/
|
||||
#endif
|
||||
#if !defined(__GLIBC__)
|
||||
#if !defined(__GLIBC__) && !defined(__LCLINT__)
|
||||
extern char ** environ;
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <rpmmacro.h>
|
||||
#include <rpmurl.h>
|
||||
|
||||
#define _NEED_TEITERATOR 1
|
||||
#include "depends.h"
|
||||
#include "rpmte.h"
|
||||
#include "rpmts.h"
|
||||
|
||||
#include "manifest.h"
|
||||
#include "misc.h"
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
#include <rpmurl.h>
|
||||
#include <rpmpgp.h>
|
||||
|
||||
#include "depends.h"
|
||||
#include "rpmds.h"
|
||||
#include "rpmts.h"
|
||||
#include "misc.h" /* XXX myGlobPatternP */
|
||||
|
||||
#include "debug.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*@-declundef -fcnuse -typeuse @*/
|
||||
/*@-declundef -fcnuse -noparams -typeuse @*/
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.1.4, March 11th, 2002
|
||||
|
||||
|
@ -892,4 +892,4 @@ ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
|||
#endif
|
||||
|
||||
#endif /* _ZLIB_H */
|
||||
/*@=declundef =fcnuse =typeuse @*/
|
||||
/*@=declundef =fcnuse =noparams =typeuse @*/
|
||||
|
|
Loading…
Reference in New Issue