Author: mlschroe Date: Fri Apr 4 15:32:19 2008 New Revision: 9377 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9377&view=rev Log: - make lock handling more sane Modified: trunk/sat-solver/testsuite/deptestomatic.c Modified: trunk/sat-solver/testsuite/deptestomatic.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/testsuite/deptestomatic.c?rev=9377&r1=9376&r2=9377&view=diff ============================================================================== --- trunk/sat-solver/testsuite/deptestomatic.c (original) +++ trunk/sat-solver/testsuite/deptestomatic.c Fri Apr 4 15:32:19 2008 @@ -1084,7 +1084,7 @@ Id id = select_solvable( pool, repo, package, version, arch, 0 ); if (id == ID_NULL) { - err( "Install: Package '%s' not found", package ); + err( "keep uninstalled lock: Package '%s' not found", package ); if (repo) err( " in channel '%s'", channel ); exit( 1 ); } @@ -1093,9 +1093,28 @@ } else /* no channel given, lock installed */ { + if (!pd->system) + { + err( "keep installed lock: no system repository defined"); + exit( 1 ); + } Id id = select_solvable( pool, pd->system, package, version, arch, 0 ); - queue_push( &(pd->trials), SOLVER_INSTALL_SOLVABLE ); - queue_push( &(pd->trials), id ); + if (id == 0) + { + id = select_solvable( pool, 0, package, version, arch, 0 ); + if (id) + { + queue_push( &(pd->trials), SOLVER_ERASE_SOLVABLE ); + queue_push( &(pd->trials), id ); + } + else + err( "keep installed lock: Package '%s' not found", package ); + } + else + { + queue_push( &(pd->trials), SOLVER_INSTALL_SOLVABLE ); + queue_push( &(pd->trials), id ); + } } } break; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org