Remove dead code.

CVS patchset: 5161
CVS date: 2001/11/08 16:28:35
This commit is contained in:
jbj 2001-11-08 16:28:35 +00:00
parent ae2e9b1bad
commit 0467af9ab5
8 changed files with 42 additions and 239 deletions

View File

@ -32,9 +32,6 @@ void rpmProblemSetFree(rpmProblemSet tsprobs)
for (i = 0; i < tsprobs->numProblems; i++) {
rpmProblem p = tsprobs->probs + i;
#ifdef DYING
p->h = headerFree(p->h, "problems");
#endif
p->pkgNEVR = _free(p->pkgNEVR);
p->altNEVR = _free(p->altNEVR);
p->str1 = _free(p->str1);
@ -106,13 +103,8 @@ int rpmProblemSetTrim(rpmProblemSet tsprobs, rpmProblemSet filter)
}
while ((t - tsprobs->probs) < tsprobs->numProblems) {
/*@-nullpass@*/ /* LCL: looks good to me */
#ifdef DYING
if (f->h == t->h && f->type == t->type && t->key == f->key &&
XSTRCMP(f->str1, t->str1))
#else
if (f->type == t->type && t->key == f->key &&
XSTRCMP(f->str1, t->str1))
#endif
/*@innerbreak@*/ break;
/*@=nullpass@*/
t++;
@ -156,30 +148,10 @@ static int sameProblem(const rpmDependencyConflict ap,
const rpmDependencyConflict bp)
/*@*/
{
#ifdef DYING
if (ap->sense != bp->sense)
return 1;
if (ap->byName && bp->byName && strcmp(ap->byName, bp->byName))
return 1;
if (ap->byVersion && bp->byVersion && strcmp(ap->byVersion, bp->byVersion))
return 1;
if (ap->byRelease && bp->byRelease && strcmp(ap->byRelease, bp->byRelease))
return 1;
if (ap->needsName && bp->needsName && strcmp(ap->needsName, bp->needsName))
return 1;
if (ap->needsVersion && bp->needsVersion && strcmp(ap->needsVersion, bp->needsVersion))
return 1;
if (ap->needsFlags && bp->needsFlags && ap->needsFlags != bp->needsFlags)
return 1;
#else
if (ap->byNEVR && bp->byNEVR && strcmp(ap->byNEVR, bp->byNEVR))
return 1;
if (ap->needsNEVR && bp->needsNEVR && strcmp(ap->needsNEVR, bp->needsNEVR))
return 1;
#endif
return 0;
}
@ -193,24 +165,12 @@ rpmDependencyConflict rpmdepFreeConflicts(rpmDependencyConflict conflicts,
if (conflicts)
for (i = 0; i < numConflicts; i++) {
#ifdef DYING
conflicts[i].byHeader = headerFree(conflicts[i].byHeader, "problem");
conflicts[i].byName = _free(conflicts[i].byName);
conflicts[i].byVersion = _free(conflicts[i].byVersion);
conflicts[i].byRelease = _free(conflicts[i].byRelease);
conflicts[i].needsName = _free(conflicts[i].needsName);
conflicts[i].needsVersion = _free(conflicts[i].needsVersion);
/*@-evalorder@*/
conflicts[i].suggestedPkgs = _free(conflicts[i].suggestedPkgs);
/*@=evalorder@*/
#else
c = conflicts + i;
c->byNEVR = _free(c->byNEVR);
c->needsNEVR = _free(c->needsNEVR);
/*@-evalorder@*/
c->suggestedKeys = _free(c->suggestedKeys);
/*@=evalorder@*/
#endif
}
return (conflicts = _free(conflicts));
@ -234,25 +194,11 @@ void printDepProblems(FILE * fp,
if (j < i)
continue;
#ifdef DYING
fprintf(fp, "\t%s", conflicts[i].needsName);
if (conflicts[i].needsFlags)
printDepFlags(fp, conflicts[i].needsVersion,
conflicts[i].needsFlags);
if (conflicts[i].sense == RPMDEP_SENSE_REQUIRES)
fprintf(fp, _(" is needed by %s-%s-%s\n"), conflicts[i].byName,
conflicts[i].byVersion, conflicts[i].byRelease);
else
fprintf(fp, _(" conflicts with %s-%s-%s\n"), conflicts[i].byName,
conflicts[i].byVersion, conflicts[i].byRelease);
#else
c = conflicts + i;
fprintf(fp, "\t%s %s %s\n", c->needsNEVR+2,
((c->needsNEVR[0] == 'C' && c->needsNEVR[1] == ' ')
? _("conflicts with") : _("is needed by")),
c->byNEVR);
#endif
}
}

View File

@ -1214,18 +1214,10 @@ rpmRC rpmInstallSourcePackage(rpmTransactionSet ts,
fi->multiLib = 0; /* MULTILIB for src.rpm's? */
#ifdef DYING
/*@-kepttrans@*/
fi->key = alGetKey(ts->addedPackages, pkgKey);
/*@=kepttrans@*/
fi->relocs = alGetRelocs(ts->addedPackages, pkgKey);
fi->fd = alGetFd(ts->addedPackages, pkgKey);
#else
fi->key = NULL;
fi->key = NULL; /* FIXME: this may be needed somewhen */
/* XXX don't bother with fd, linked directly into fi below. */
/*@i@*/ fi->fd = fd;
fi->relocs = NULL;
#endif
/* XXX header arg unused. */
loadFi(ts, fi, fi->h, 1);

View File

@ -34,9 +34,6 @@ typedef /*@abstract@*/ struct availableIndex_s * availableIndex;
/*@access fnpyKey@*/
/*@access rpmFNSet@*/
#ifdef DYING
/*@access rpmDepSet@*/
#endif
/** \ingroup rpmdep
* Info about a single package to be installed.
@ -357,10 +354,6 @@ static int fieCompare(const void * one, const void * two)
void alDelPackage(availableList al, alKey pkgKey)
{
#ifdef DYING
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
#endif
availablePackage alp;
rpmFNSet fns;
alNum pkgNum = alKey2Num(al, pkgKey);
@ -378,11 +371,6 @@ fprintf(stderr, "*** del %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
if ((fns = alp->fns) != NULL)
if (fns->BN != NULL && fns->Count > 0) {
int origNumDirs = al->numDirs;
#ifdef DYING
const char ** dirNames;
int_32 numDirs;
rpmTagType dnt;
#endif
int dirNum;
dirInfo dieNeedle =
memset(alloca(sizeof(*dieNeedle)), 0, sizeof(*dieNeedle));
@ -390,10 +378,6 @@ fprintf(stderr, "*** del %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
int last;
int i;
#ifdef DYING
xx = hge(alp->h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
#endif
/* XXX FIXME: We ought to relocate the directory list here */
if (al->dirs != NULL)
@ -440,10 +424,6 @@ fprintf(stderr, "*** del %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
else
al->dirs = _free(al->dirs);
}
#ifdef DYING
dirNames = hfd(dirNames, dnt);
#endif
}
alp->provides = dsFree(alp->provides);
@ -462,9 +442,6 @@ alKey alAddPackage(availableList al, alKey pkgKey, fnpyKey key, Header h)
{
int scareMem = 1;
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
#ifdef DYING
HFD_t hfd = headerFreeData;
#endif
availablePackage alp;
alNum pkgNum = alKey2Num(al, pkgKey);
int xx;
@ -572,10 +549,6 @@ fprintf(stderr, "*** add %p[%d] %s-%s-%s\n", al->list, pkgNum, alp->name, alp->v
}
}
#ifdef DYING
fns->DN = hfd(fns->DN, fns->DNt);
#endif
last = 0;
for (first = 0; first < fns->Count; first = last + 1) {
fileIndexEntry fie;

View File

@ -543,15 +543,7 @@ void dsProblem(problemsSet psp, Header h, const rpmDepSet ds,
const char * Name = dsiGetN(ds);
const char * DNEVR = dsiGetDNEVR(ds);
const char * EVR = dsiGetEVR(ds);
#ifdef DYING
int_32 Flags = dsiGetFlags(ds);
const char * name, * version, * release;
int xx;
xx = headerNVR(h, &name, &version, &release);
#else
char * byNEVR = hGetNVR(h, NULL);
#endif
/*@-branchstate@*/
if (Name == NULL) Name = "?N?";
@ -571,25 +563,8 @@ void dsProblem(problemsSet psp, Header h, const rpmDepSet ds,
dcp = psp->problems + psp->num;
psp->num++;
#ifdef DYING
dcp->byHeader = headerLink(h, "dsProblem");
dcp->byName = xstrdup(name);
dcp->byVersion = xstrdup(version);
dcp->byRelease = xstrdup(release);
dcp->needsName = xstrdup(Name);
dcp->needsVersion = xstrdup(EVR);
dcp->needsFlags = Flags;
if (ds->tagN == RPMTAG_REQUIRENAME)
dcp->sense = RPMDEP_SENSE_REQUIRES;
else if (ds->tagN == RPMTAG_CONFLICTNAME)
dcp->sense = RPMDEP_SENSE_CONFLICTS;
else
dcp->sense = 0;
#else
dcp->byNEVR = byNEVR;
dcp->needsNEVR = xstrdup(DNEVR);
#endif
dcp->suggestedKeys = suggestedKeys;
}

View File

@ -68,12 +68,6 @@ _free(/*@only@*/ /*@null@*/ /*@out@*/ const void * p)
typedef /*@abstract@*/ /*@refcounted@*/
struct rpmTransactionSet_s * rpmTransactionSet;
#ifdef DYING
/** \ingroup rpmtrans
* A package in a transaction set.
*/
typedef /*@abstract@*/ struct availablePackage_s * availablePackage;
#else
/** \ingroup rpmtrans
* An added/available package retrieval key.
*/
@ -87,8 +81,9 @@ typedef /*@abstract@*/ void * alKey;
typedef /*@abstract@*/ int alNum;
/*@=mutrep@*/
#endif
/**
* Tag sets from a header, so that a header can be discarded early.
*/
typedef /*@abstract@*/ struct rpmDepSet_s * rpmDepSet;
/** \ingroup header
@ -982,10 +977,7 @@ typedef enum rpmProblemType_e {
struct rpmProblem_s {
/*@only@*/ /*@null@*/ const char * pkgNEVR;
/*@only@*/ /*@null@*/ const char * altNEVR;
/*@kept@*/ /*@null@*/ const void * key;
#ifdef DYING
/*@null@*/ Header h;
#endif
/*@kept@*/ /*@null@*/ fnpyKey key;
rpmProblemType type;
int ignoreProblem;
/*@only@*/ /*@null@*/ const char * str1;
@ -1009,31 +1001,10 @@ void printDepFlags(FILE *fp, const char *version, int flags)
/**
*/
struct rpmDependencyConflict_s {
#ifdef DYING
const char * byName; /*!< package name */
const char * byVersion; /*!< package version */
const char * byRelease; /*!< package release */
Header byHeader; /*!< header with dependency problems */
/*
* These needs fields are misnamed -- they are used for the package
* which isn't needed as well.
*/
const char * needsName; /*!< dependency name */
const char * needsVersion; /*!< dependency epoch:version-release */
int needsFlags; /*!< dependency flags */
#else
char * byNEVR; /*!< package name-version-release */
char * needsNEVR; /*!< dependency [R|C] name ?? epoch:version-release */
#endif
/*@owned@*/ /*@null@*/
const fnpyKey * suggestedKeys; /*!< Added package keys, NULL terminated. */
#ifdef DYING
enum {
RPMDEP_SENSE_REQUIRES, /*!< requirement not satisfied. */
RPMDEP_SENSE_CONFLICTS /*!< conflict was found. */
} sense;
#endif
};
/**

View File

@ -124,11 +124,7 @@ int rpmtransGetKeys(const rpmTransactionSet ts, fnpyKey ** ep, int * nep)
for (oc = 0; oc < ts->orderCount; oc++, e++) {
switch (ts->order[oc].type) {
case TR_ADDED:
#ifdef DYING
*e = alGetKey(ts->addedPackages, ts->order[oc].u.addedKey);
#else
*e = ts->order[oc].key;
#endif
/*@switchbreak@*/ break;
default:
case TR_REMOVED:
@ -1034,13 +1030,8 @@ int keep_header = 1; /* XXX rpmProblemSetAppend prevents dumping headers. */
* - count files.
*/
/* The ordering doesn't matter here */
#ifdef DYING
for (i = 0; i < alGetSize(ts->addedPackages); i++)
#else
tei = teInitIterator(ts);
while ((p = teNext(tei, TR_ADDED)) != NULL)
#endif
{
while ((p = teNext(tei, TR_ADDED)) != NULL) {
const char * n, * v, * r;
fnpyKey key;
rpmdbMatchIterator mi;
@ -1053,11 +1044,7 @@ int keep_header = 1; /* XXX rpmProblemSetAppend prevents dumping headers. */
continue;
(void) headerNVR(h, &n, &v, &r);
#ifdef DYING
key = alGetKey(ts->addedPackages, pkgKey);
#else
key = p->key;
#endif
if (!archOkay(h) && !(ts->ignoreSet & RPMPROB_FILTER_IGNOREARCH))
rpmProblemSetAppend(ts->probs, RPMPROB_BADARCH,
@ -1152,17 +1139,9 @@ int keep_header = 1; /* XXX rpmProblemSetAppend prevents dumping headers. */
fi->multiLib = ts->order[oc].multiLib;
#endif
#ifdef DYING
/*@-kepttrans@*/
fi->key = alGetKey(ts->addedPackages, pkgKey);
/*@=kepttrans@*/
fi->relocs = alGetRelocs(ts->addedPackages, pkgKey);
fi->fd = alGetFd(ts->addedPackages, pkgKey);
#else
/*@i@*/ fi->key = ts->order[oc].key;
fi->relocs = ts->order[oc].relocs;
/*@i@*/ fi->fd = ts->order[oc].fd;
#endif
/* XXX availablePackage can be dumped here XXX */

View File

@ -503,24 +503,13 @@ static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmTransactionSet ts,
/*@-branchstate@*/
if (numConflicts) {
rpmDependencyConflict c;
#ifdef DYING
const char *n, *v, *r;
#endif
char * t, * te;
int nb = 512;
#ifdef DYING
(void) headerNVR(h, &n, &v, &r);
#endif
/*@-type@*/ /* FIX: rpmDependencyConflict usage */
for (i = 0; i < numConflicts; i++) {
c = conflicts + i;
nb += strlen(c->needsNEVR+2) + sizeof(", ") - 1;
#ifdef DYING
if (conflicts[i].needsFlags)
nb += strlen(conflicts[i].needsVersion) + 5;
#endif
}
te = t = alloca(nb);
*te = '\0';
@ -529,20 +518,8 @@ static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmTransactionSet ts,
for (i = 0; i < numConflicts; i++) {
c = conflicts + i;
if (i) te = stpcpy(te, ", ");
#ifdef DYING
te = stpcpy(te, c->needsName);
if (conflicts[i].needsFlags) {
int flags = c->needsFlags;
*te++ = ' ';
if (flags & RPMSENSE_LESS) *te++ = '<';
if (flags & RPMSENSE_GREATER) *te++ = '>';
if (flags & RPMSENSE_EQUAL) *te++ = '=';
*te++ = ' ';
te = stpcpy(te, conflicts[i].needsVersion);
}
#else
/* XXX FIXME: should probably supply the "[R|C] " type prefix */
te = stpcpy(te, c->needsNEVR+2);
#endif
}
conflicts = rpmdepFreeConflicts(conflicts, numConflicts);
/*@=type@*/

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2001-11-07 18:58-0500\n"
"POT-Creation-Date: 2001-11-07 19:23-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -816,7 +816,7 @@ msgstr ""
msgid "Could not open %s: %s\n"
msgstr ""
#: build/pack.c:603 lib/psm.c:2152
#: build/pack.c:603 lib/psm.c:2144
#, c-format
msgid "Unable to write package: %s\n"
msgstr ""
@ -846,7 +846,7 @@ msgstr ""
msgid "Unable to write payload to %s: %s\n"
msgstr ""
#: build/pack.c:683 lib/psm.c:2417
#: build/pack.c:683 lib/psm.c:2409
#, c-format
msgid "Wrote: %s\n"
msgstr ""
@ -2105,75 +2105,65 @@ msgstr ""
msgid "generate signature"
msgstr ""
#: lib/problems.c:244
#, c-format
msgid " is needed by %s-%s-%s\n"
msgstr ""
#: lib/problems.c:247
#, c-format
msgid " conflicts with %s-%s-%s\n"
msgstr ""
#: lib/problems.c:253
#: lib/problems.c:200
msgid "conflicts with"
msgstr ""
#: lib/problems.c:253
#: lib/problems.c:200
msgid "is needed by"
msgstr ""
#: lib/problems.c:294
#: lib/problems.c:240
#, c-format
msgid "package %s is for a different architecture"
msgstr ""
#: lib/problems.c:299
#: lib/problems.c:245
#, c-format
msgid "package %s is for a different operating system"
msgstr ""
#: lib/problems.c:304
#: lib/problems.c:250
#, c-format
msgid "package %s is already installed"
msgstr ""
#: lib/problems.c:309
#: lib/problems.c:255
#, c-format
msgid "path %s in package %s is not relocateable"
msgstr ""
#: lib/problems.c:314
#: lib/problems.c:260
#, c-format
msgid "file %s conflicts between attempted installs of %s and %s"
msgstr ""
#: lib/problems.c:319
#: lib/problems.c:265
#, c-format
msgid "file %s from install of %s conflicts with file from package %s"
msgstr ""
#: lib/problems.c:324
#: lib/problems.c:270
#, c-format
msgid "package %s (which is newer than %s) is already installed"
msgstr ""
#: lib/problems.c:329
#: lib/problems.c:275
#, c-format
msgid "installing package %s needs %ld%cb on the %s filesystem"
msgstr ""
#: lib/problems.c:339
#: lib/problems.c:285
#, c-format
msgid "installing package %s needs %ld inodes on the %s filesystem"
msgstr ""
#: lib/problems.c:344
#: lib/problems.c:290
#, c-format
msgid "package %s pre-transaction syscall(s): %s failed: %s"
msgstr ""
#: lib/problems.c:351
#: lib/problems.c:297
#, c-format
msgid "unknown error %d encountered while manipulating package %s"
msgstr ""
@ -2226,60 +2216,60 @@ msgstr ""
msgid "source package expected, binary found\n"
msgstr ""
#: lib/psm.c:1330
#: lib/psm.c:1322
msgid "source package contains no .spec file\n"
msgstr ""
#: lib/psm.c:1440
#: lib/psm.c:1432
#, c-format
msgid "%s: running %s scriptlet\n"
msgstr ""
#: lib/psm.c:1608
#: lib/psm.c:1600
#, c-format
msgid "execution of %s scriptlet from %s-%s-%s failed, waitpid returned %s\n"
msgstr ""
#: lib/psm.c:1615
#: lib/psm.c:1607
#, c-format
msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n"
msgstr ""
#: lib/psm.c:1957
#: lib/psm.c:1949
#, c-format
msgid "%s: %s-%s-%s has %d files, test = %d\n"
msgstr ""
#: lib/psm.c:2074
#: lib/psm.c:2066
#, c-format
msgid "%s: %s scriptlet failed (%d), skipping %s-%s-%s\n"
msgstr ""
#: lib/psm.c:2188
#: lib/psm.c:2180
#, c-format
msgid "user %s does not exist - using root\n"
msgstr ""
#: lib/psm.c:2197
#: lib/psm.c:2189
#, c-format
msgid "group %s does not exist - using root\n"
msgstr ""
#: lib/psm.c:2238
#: lib/psm.c:2230
#, c-format
msgid "unpacking of archive failed%s%s: %s\n"
msgstr ""
#: lib/psm.c:2239
#: lib/psm.c:2231
msgid " on file "
msgstr ""
#: lib/psm.c:2425
#: lib/psm.c:2417
#, c-format
msgid "%s failed on file %s: %s\n"
msgstr ""
#: lib/psm.c:2428
#: lib/psm.c:2420
#, c-format
msgid "%s failed: %s\n"
msgstr ""
@ -2406,11 +2396,11 @@ msgstr ""
msgid "package %s is not installed\n"
msgstr ""
#: lib/rpmal.c:793
#: lib/rpmal.c:766
msgid "(added files)"
msgstr ""
#: lib/rpmal.c:892
#: lib/rpmal.c:865
msgid "(added provide)"
msgstr ""
@ -2491,7 +2481,7 @@ msgid " %s A %s\tB %s\n"
msgstr ""
#. @=branchstate@
#: lib/rpmds.c:562
#: lib/rpmds.c:554
#, c-format
msgid "package %s has unsatisfied %s: %s\n"
msgstr ""
@ -2820,13 +2810,13 @@ msgstr ""
msgid "Signature: UNKNOWN (%d)\n"
msgstr ""
#: lib/transaction.c:248
#: lib/transaction.c:244
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""
#. @innercontinue@
#: lib/transaction.c:887
#: lib/transaction.c:883
#, c-format
msgid "excluding directory %s\n"
msgstr ""
@ -2844,12 +2834,12 @@ msgstr ""
msgid "missing %s"
msgstr ""
#: lib/verify.c:527
#: lib/verify.c:516
#, c-format
msgid "Unsatisifed dependencies for %s:"
msgstr ""
#: lib/verify.c:577
#: lib/verify.c:554
#, c-format
msgid "%s-%s-%s: immutable header region digest check failed\n"
msgstr ""