- _solv->vendorCheckCb = &vendorCheck;
- _solv->fixsystem = _fixsystem;
- _solv->ignorealreadyrecommended = _ignorealreadyrecommended;
- _solv->updatesystem = _updatesystem;
- _solv->allowdowngrade = _allowdowngrade;
- _solv->allowuninstall = _allowuninstall;
- _solv->allowarchchange = _allowarchchange;
- _solv->allowvendorchange = _allowvendorchange;
- _solv->dosplitprovides = _dosplitprovides;
- _solv->noupdateprovide = _noupdateprovide;
- _solv->dontinstallrecommended = _onlyRequires;
- _solv->distupgrade = _distupgrade;
- _solv->distupgrade_removeunsupported = _distupgrade_removeunsupported;
-
- sat::Pool::instance().prepare();
+ ::pool_set_custom_vendorcheck( _SATPool, &vendorCheck );
+ if (_fixsystem) {
+ queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
+ queue_push( &(_jobQueue), 0 );
+ }
+ if (_updatesystem) {
+ queue_push( &(_jobQueue), SOLVER_UPDATE|SOLVER_SOLVABLE_ALL);
+ queue_push( &(_jobQueue), 0 );
+ }
+ if (_distupgrade) {
+ queue_push( &(_jobQueue), SOLVER_DISTUPGRADE|SOLVER_SOLVABLE_ALL);
+ queue_push( &(_jobQueue), 0 );
+ }
+ if (_distupgrade_removeunsupported) {
+ queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
+ queue_push( &(_jobQueue), 0 );
+ }
+ solver_set_flag(_solv, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
+ solver_set_flag(_solv, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
+ solver_set_flag(_solv, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
+ solver_set_flag(_solv, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
+ solver_set_flag(_solv, SOLVER_FLAG_ALLOW_VENDORCHANGE, _allowvendorchange);
+ solver_set_flag(_solv, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
+ solver_set_flag(_solv, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
+ solver_set_flag(_solv, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires);
+
+#define HACKENV(X,D) solver_set_flag(_solv, X, env::HACKENV( #X, D ) );
+ HACKENV( SOLVER_FLAG_DUP_ALLOW_DOWNGRADE, true );
+ HACKENV( SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, true );
+ HACKENV( SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE,true );
+ HACKENV( SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, true );
+#undef HACKENV
+
+ sat::Pool::instance().prepareForSolving();