From 017e91546bed00356d44d5ad997db01b3ffd2bdf Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 20 Dec 2010 11:50:30 +0200 Subject: [PATCH] Rip the remains of --aid and --nosuggest, except for the callback - Only thing ever using RPMTRANS_FLAG_ADDINDEPS and _NOSUGGEST was rpm itself, and we haven't had an in-rpm implementation for this since the broken "rpmdb as repo format" was ripped out in 4.6.0. We dont need these special flags to support the operation anyway, IF somebody sets the solve callback, it will be used and the one implementing the callback gets to deal with whether those bits should be added to transaction or not. (cherry picked from commit 3b07e36fc430ae15a34a6b4c3249460ddf120c01) --- lib/depends.c | 3 +-- lib/poptI.c | 8 -------- lib/rpminstall.c | 3 --- lib/rpmts.h | 4 ++-- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/depends.c b/lib/depends.c index 3cc0d64..4a4daa5 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -422,8 +422,7 @@ retry: goto exit; /* Search for an unsatisfied dependency. */ - if (adding && !retrying && !(dsflags & RPMSENSE_PRETRANS) && - !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST)) { + if (adding && !retrying && !(dsflags & RPMSENSE_PRETRANS)) { int xx = rpmtsSolve(ts, dep); if (xx == 0) goto exit; diff --git a/lib/poptI.c b/lib/poptI.c index 034a4d4..8c1ff6e 100644 --- a/lib/poptI.c +++ b/lib/poptI.c @@ -109,10 +109,6 @@ struct poptOption rpmInstallPoptTable[] = { { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE, installArgCallback, 0, NULL, NULL }, - { "aid", '\0', POPT_BIT_SET | POPT_ARGFLAG_DOC_HIDDEN, - &rpmIArgs.transFlags, RPMTRANS_FLAG_ADDINDEPS, - N_("add suggested packages to transaction"), NULL }, - { "allfiles", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, RPMTRANS_FLAG_ALLFILES, N_("install all files, even configurations which might otherwise be skipped"), @@ -191,10 +187,6 @@ struct poptOption rpmInstallPoptTable[] = { N_("do not reorder package installation to satisfy dependencies"), NULL}, - { "nosuggest", '\0', POPT_BIT_SET | POPT_ARGFLAG_DOC_HIDDEN, - &rpmIArgs.transFlags, RPMTRANS_FLAG_NOSUGGEST, - N_("do not suggest missing dependency resolution(s)"), NULL}, - { "noscripts", '\0', 0, NULL, RPMCLI_POPT_NOSCRIPTS, N_("do not execute package scriptlet(s)"), NULL }, diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 072d11e..b4ffd10 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -639,9 +639,6 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv) vsflags = setvsFlags(ia); ovsflags = rpmtsSetVSFlags(ts, vsflags); - /* 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 */ diff --git a/lib/rpmts.h b/lib/rpmts.h index 9df63ef..7422385 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -59,8 +59,8 @@ enum rpmtransFlags_e { RPMTRANS_FLAG_NOMD5 = (1 << 27), /*!< from --nomd5 */ RPMTRANS_FLAG_NOFILEDIGEST = (1 << 27), /*!< from --nofiledigest (alias to --nomd5) */ - RPMTRANS_FLAG_NOSUGGEST = (1 << 28), /*!< from --nosuggest */ - RPMTRANS_FLAG_ADDINDEPS = (1 << 29), /*!< from --aid */ + RPMTRANS_FLAG_NOSUGGEST = (1 << 28), /*!< obsolete, unused */ + RPMTRANS_FLAG_ADDINDEPS = (1 << 29), /*!< obsolete, unused */ RPMTRANS_FLAG_NOCONFIGS = (1 << 30), /*!< from --noconfigs */ RPMTRANS_FLAG_DEPLOOPS = (1 << 31) /*!< from --deploops */ }; -- 2.7.4