- fix types in p5solv and pysolv
authorMichael Schroeder <mls@suse.de>
Thu, 12 Jan 2012 11:01:20 +0000 (12:01 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 12 Jan 2012 11:01:20 +0000 (12:01 +0100)
examples/p5solv
examples/pysolv

index 7aeb79f..5cc9cff 100755 (executable)
@@ -757,7 +757,7 @@ if ($cmd eq 'install' || $cmd eq 'erase' || $cmd eq 'up' || $cmd eq 'dup' || $cm
     $solver->set_flag($solv::Solver::SOLVER_FLAG_IGNORE_ALREADY_RECOMMENDED, 1);
     $solver->set_flag($solv::Solver::SOLVER_FLAG_SPLITPROVIDES, 1);
     $solver->set_flag($solv::Solver::SOLVER_FLAG_ALLOW_UNINSTALL, 1) if $cmd eq 'erase';
-    if ($cmd eq 'dup' && @jobs == 1 $jobs[0]->{'how'} == ($solv::Job::SOLVER_DISTUPGRADE | $solv::Job::SOLVER_SOLVABLE_ALL)) {
+    if ($cmd eq 'dup' && @jobs == 1 && $jobs[0]->{'how'} == ($solv::Job::SOLVER_DISTUPGRADE | $solv::Job::SOLVER_SOLVABLE_ALL)) {
       $solver->set_flag($solv::Solver::SOLVER_FLAG_ALLOW_DOWNGRADE, 1);
       $solver->set_flag($solv::Solver::SOLVER_FLAG_ALLOW_VENDERCHANGE, 1);
       $solver->set_flag($solv::Solver::SOLVER_FLAG_ALLOW_ARCHCHANGE, 1);
index 7c628da..197ba04 100755 (executable)
@@ -869,7 +869,7 @@ if cmd == 'install' or cmd == 'erase' or cmd == 'up' or cmd == 'dup' or cmd == '
                 print "  Solution %d:" % solution.id
                 elements = solution.elements(True)
                 for element in elements:
-                    print "  - %s" % element.str
+                    print "  - %s" % element.str()
                 print
             sol = ''
             while not (sol == 's' or sol == 'q' or (sol.isdigit() and int(sol) >= 1 and int(sol) <= len(solutions))):