Kill ts->goal, instead set NOSUGGEST flag on erase
- it aint quite the same thing but will suffice for now...
This commit is contained in:
parent
1aca65c9a7
commit
68dcdd5dad
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -127,20 +127,11 @@ struct diskspaceInfo_s {
|
|||
probably right :-( */
|
||||
#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. */
|
||||
|
|
Loading…
Reference in New Issue