diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-31 10:15:05 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-31 10:15:05 +0200 |
commit | 68dcdd5dad79481bd5561ba6b0556bdb84b66c15 (patch) | |
tree | d2e0bab8453919aa31098ddc4cdb53b847ab0ae8 /lib | |
parent | 1aca65c9a7822ab627385df1c181b3b53cdbee88 (diff) | |
download | librpm-tizen-68dcdd5dad79481bd5561ba6b0556bdb84b66c15.tar.gz librpm-tizen-68dcdd5dad79481bd5561ba6b0556bdb84b66c15.tar.bz2 librpm-tizen-68dcdd5dad79481bd5561ba6b0556bdb84b66c15.zip |
Kill ts->goal, instead set NOSUGGEST flag on erase
- it aint quite the same thing but will suffice for now...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpminstall.c | 6 | ||||
-rw-r--r-- | lib/rpmts.c | 5 | ||||
-rw-r--r-- | lib/rpmts.h | 9 |
3 files changed, 3 insertions, 17 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c index e2461c01e..f1d8719bc 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -261,7 +261,6 @@ const char * fileURL = NULL; if (fileArgv == NULL) goto exit; - ts->goal = TSM_INSTALL; rpmcliPackagesTotal = 0; if (rpmExpandNumeric("%{?_repackage_all_erasures}")) @@ -715,6 +714,9 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, if (rpmExpandNumeric("%{?_repackage_all_erasures}")) ia->transFlags |= RPMTRANS_FLAG_REPACKAGE; + /* XXX suggest mechanism only meaningful when installing */ + ia->transFlags |= RPMTRANS_FLAG_NOSUGGEST; + (void) rpmtsSetFlags(ts, ia->transFlags); #ifdef NOTYET /* XXX no callbacks on erase yet */ @@ -725,8 +727,6 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, } #endif - ts->goal = TSM_ERASE; - for (arg = argv; *arg; arg++) { rpmdbMatchIterator mi; diff --git a/lib/rpmts.c b/lib/rpmts.c index 8e5eba7eb..67c1c153d 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -664,10 +664,6 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data) int rc = 1; /* assume not found */ int xx; - /* Make suggestions only for install Requires: */ - if (ts->goal != TSM_INSTALL) - return rc; - if (rpmdsTagN(ds) != RPMTAG_REQUIRENAME) return rc; @@ -1575,7 +1571,6 @@ rpmts rpmtsCreate(void) memset(&ts->ops, 0, sizeof(ts->ops)); (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_TOTAL), -1); ts->type = RPMTRANS_TYPE_NORMAL; - ts->goal = TSM_UNKNOWN; ts->filesystemCount = 0; ts->filesystems = NULL; ts->dsi = NULL; diff --git a/lib/rpmts.h b/lib/rpmts.h index 4a4108cc8..2244e51ea 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -128,19 +128,10 @@ struct diskspaceInfo_s { #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block)) /** \ingroup rpmts - */ -typedef enum tsStage_e { - TSM_UNKNOWN = 0, - TSM_INSTALL = 7, - TSM_ERASE = 8, -} tsmStage; - -/** \ingroup rpmts * The set of packages to be installed/removed atomically. */ struct rpmts_s { rpmtransFlags transFlags; /*!< Bit(s) to control operation. */ - tsmStage goal; /*!< Transaction goal (i.e. mode) */ rpmtsType type; /*!< default, rollback, autorollback */ rpmdb sdb; /*!< Solve database handle. */ |