Queue addedfileprovides_inst;
Queue repofilter;
int cleandeps = 0;
+ int forcebest = 0;
char *rootdir = 0;
argc--;
argc--;
argv++;
}
+ else if (argc > 1 && !strcmp(argv[1], "--best"))
+ {
+ forcebest = 1;
+ argc--;
+ argv++;
+ }
else
break;
}
job.elements[i] ^= SOLVER_UPDATE ^ SOLVER_INSTALL;
if (cleandeps)
job.elements[i] |= SOLVER_CLEANDEPS;
+ if (forcebest)
+ job.elements[i] |= SOLVER_FORCEBEST;
}
// multiversion test
solver_set_flag(solv, SOLVER_FLAG_SPLITPROVIDES, 1);
if (mainmode == MODE_ERASE)
solver_set_flag(solv, SOLVER_FLAG_ALLOW_UNINSTALL, 1); /* don't nag */
+ solver_set_flag(solv, SOLVER_FLAG_BEST_OBEY_POLICY, 1);
if (!solver_solve(solv, &job))
break;
{ SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, "addalreadyrecommended", 0 },
{ SOLVER_FLAG_NO_INFARCHCHECK, "noinfarchcheck", 0 },
{ SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES, "keepexplicitobsoletes", 0 },
+ { SOLVER_FLAG_BEST_OBEY_POLICY, "bestobeypolicy", 0 },
{ 0, 0, 0 }
};