summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-29 16:39:13 +0000
committerjbj <devnull@localhost>2001-10-29 16:39:13 +0000
commit89c1ce1325ed7391e3253aab3eb8c176af38781d (patch)
treebf9ed1feaff47dae7bd3588ab19f306c4afe432e /lib
parent87b17923e66310483ce1ed2cf5f54adcb80e9e23 (diff)
downloadlibrpm-tizen-89c1ce1325ed7391e3253aab3eb8c176af38781d.tar.gz
librpm-tizen-89c1ce1325ed7391e3253aab3eb8c176af38781d.tar.bz2
librpm-tizen-89c1ce1325ed7391e3253aab3eb8c176af38781d.zip
Remove DYING code.
CVS patchset: 5139 CVS date: 2001/10/29 16:39:13
Diffstat (limited to 'lib')
-rw-r--r--lib/misc.h8
-rw-r--r--lib/psm.c77
-rw-r--r--lib/psm.h17
-rw-r--r--lib/transaction.c73
4 files changed, 0 insertions, 175 deletions
diff --git a/lib/misc.h b/lib/misc.h
index c730a7209..b530c4000 100644
--- a/lib/misc.h
+++ b/lib/misc.h
@@ -6,14 +6,6 @@
*
*/
-#ifdef DYING
-#include <unistd.h>
-#include <sys/types.h>
-
-#include "header.h"
-#include "ugid.h"
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/lib/psm.c b/lib/psm.c
index cd18d4749..f86995dd0 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -73,83 +73,6 @@ int rpmVersionCompare(Header first, Header second)
return rpmvercmp(one, two);
}
-#ifdef DYING
-rpmProblemSet rpmProblemSetCreate(void)
-{
- rpmProblemSet probs;
-
- probs = xcalloc(1, sizeof(*probs)); /* XXX memory leak */
- probs->numProblems = probs->numProblemsAlloced = 0;
- probs->probs = NULL;
-
- return probs;
-}
-
-void rpmProblemSetAppend(rpmProblemSet probs, rpmProblemType type,
- const availablePackage alp,
- const char * dn, const char * bn,
- Header altH, unsigned long ulong1)
-{
- rpmProblem p;
- char *t;
-
- if (probs->numProblems == probs->numProblemsAlloced) {
- if (probs->numProblemsAlloced)
- probs->numProblemsAlloced *= 2;
- else
- probs->numProblemsAlloced = 2;
- probs->probs = xrealloc(probs->probs,
- probs->numProblemsAlloced * sizeof(*probs->probs));
- }
-
- p = probs->probs + probs->numProblems;
- probs->numProblems++;
- memset(p, 0, sizeof(*p));
- p->type = type;
- /*@-assignexpose@*/
- p->key = alp->key;
- /*@=assignexpose@*/
- p->ulong1 = ulong1;
- p->ignoreProblem = 0;
- p->str1 = NULL;
- p->h = NULL;
- p->pkgNEVR = NULL;
- p->altNEVR = NULL;
-
- if (dn || bn) {
- p->str1 =
- t = xcalloc(1, (dn ? strlen(dn) : 0) + (bn ? strlen(bn) : 0) + 1);
- if (dn) t = stpcpy(t, dn);
- if (bn) t = stpcpy(t, bn);
- }
-
- if (alp) {
- p->h = headerLink(alp->h);
- p->pkgNEVR =
- t = xcalloc(1, strlen(alp->name) +
- strlen(alp->version) +
- strlen(alp->release) + sizeof("--"));
- t = stpcpy(t, alp->name);
- t = stpcpy(t, "-");
- t = stpcpy(t, alp->version);
- t = stpcpy(t, "-");
- t = stpcpy(t, alp->release);
- }
-
- if (altH) {
- const char * n, * v, * r;
- (void) headerNVR(altH, &n, &v, &r);
- p->altNEVR =
- t = xcalloc(1, strlen(n) + strlen(v) + strlen(r) + sizeof("--"));
- t = stpcpy(t, n);
- t = stpcpy(t, "-");
- t = stpcpy(t, v);
- t = stpcpy(t, "-");
- t = stpcpy(t, r);
- }
-}
-#endif /* DYING */
-
/**
*/
static /*@observer@*/ const char *const ftstring (fileTypes ft)
diff --git a/lib/psm.h b/lib/psm.h
index 1af348d7c..873e61a12 100644
--- a/lib/psm.h
+++ b/lib/psm.h
@@ -173,23 +173,6 @@ struct psm_s {
extern "C" {
#endif
-#ifdef DYING
-/**
- * Create problem set.
- */
-/*@only@*/ rpmProblemSet rpmProblemSetCreate(void)
- /*@*/;
-
-/**
- * Append problem to set.
- */
-void rpmProblemSetAppend(rpmProblemSet tsprobs, rpmProblemType type,
- const availablePackage alp,
- const char * dn, const char * bn,
- Header altH, unsigned long ulong1)
- /*@modifies tsprobs, alp @*/;
-#endif /* DYING */
-
/**
* Return file type from mode_t.
* @param mode file mode bits (from header)
diff --git a/lib/transaction.c b/lib/transaction.c
index b8313fc2a..f33b1c4be 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -77,10 +77,6 @@ struct diskspaceInfo {
probably right :-( */
#define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))
-#ifdef DYING
-#define XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b))))
-#endif
-
/**
*/
static /*@null@*/ void * freeFl(rpmTransactionSet ts,
@@ -199,75 +195,6 @@ static int osOkay(Header h)
return 1;
}
-#ifdef DYING
-void rpmProblemSetFree(rpmProblemSet tsprobs)
-{
- int i;
-
- for (i = 0; i < tsprobs->numProblems; i++) {
- rpmProblem p = tsprobs->probs + i;
- p->h = headerFree(p->h);
- p->pkgNEVR = _free(p->pkgNEVR);
- p->altNEVR = _free(p->altNEVR);
- p->str1 = _free(p->str1);
- }
- free(tsprobs);
-}
-
-/**
- * Filter a problem set.
- * As the problem sets are generated in an order solely dependent
- * on the ordering of the packages in the transaction, and that
- * ordering can't be changed, the problem sets must be parallel to
- * one another. Additionally, the filter set must be a subset of the
- * target set, given the operations available on transaction set.
- * This is good, as it lets us perform this trim in linear time, rather
- * then logarithmic or quadratic.
- *
- * @param tsprobs transaction problem set
- * @param filter filter
- * @return 0 no problems, 1 if problems remain
- */
-static int rpmProblemSetTrim(rpmProblemSet tsprobs, rpmProblemSet filter)
- /*@modifies tsprobs @*/
-{
- rpmProblem t = tsprobs->probs;
- rpmProblem f = filter->probs;
- int gotProblems = 0;
-
- /*@-branchstate@*/
- while ((f - filter->probs) < filter->numProblems) {
- if (!f->ignoreProblem) {
- f++;
- continue;
- }
- while ((t - tsprobs->probs) < tsprobs->numProblems) {
- /*@-nullpass@*/ /* LCL: looks good to me */
- if (f->h == t->h && f->type == t->type && t->key == f->key &&
- XSTRCMP(f->str1, t->str1))
- /*@innerbreak@*/ break;
- /*@=nullpass@*/
- t++;
- gotProblems = 1;
- }
-
- if ((t - tsprobs->probs) == tsprobs->numProblems) {
- /* this can't happen ;-) let's be sane if it doesn though */
- break;
- }
-
- t->ignoreProblem = f->ignoreProblem;
- t++, f++;
- }
- /*@=branchstate@*/
-
- if ((t - tsprobs->probs) < tsprobs->numProblems)
- gotProblems = 1;
-
- return gotProblems;
-}
-#endif /* DYING */
-
/**
*/
static int sharedCmp(const void * one, const void * two)