summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-06-04 17:55:34 +0200
committerMichael Schroeder <mls@suse.de>2013-06-04 17:55:34 +0200
commit35fe9fc7beea9290200e2c3301bb5e89f359189d (patch)
treea5774b19c8fc28d38d46a688dcc0536e4e4da637 /examples
parent9f6921196d3f4c38d636505326370b8950b6ca2a (diff)
downloadlibsolv-35fe9fc7beea9290200e2c3301bb5e89f359189d.tar.gz
libsolv-35fe9fc7beea9290200e2c3301bb5e89f359189d.tar.bz2
libsolv-35fe9fc7beea9290200e2c3301bb5e89f359189d.zip
Make 'dep' attribute in Ruleinfo return an object, add fromstr/tostr attributes to TransactionClass and remove old fromdep()/todep() methods
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/p5solv6
-rwxr-xr-xexamples/pysolv4
-rwxr-xr-xexamples/rbsolv6
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/p5solv b/examples/p5solv
index 5c25954..2e3e3ed 100755
--- a/examples/p5solv
+++ b/examples/p5solv
@@ -681,9 +681,9 @@ for my $c ($trans->classify($solv::Transaction::SOLVER_TRANSACTION_SHOW_OBSOLETE
} elsif ($c->{'type'} == $solv::Transaction::SOLVER_TRANSACTION_UPGRADED) {
print "$c->{'count'} upgraded packages:\n";
} elsif ($c->{'type'} == $solv::Transaction::SOLVER_TRANSACTION_VENDORCHANGE) {
- printf "$c->{'count'} vendor changes from '%s' to '%s':\n", $c->fromdep()->str(), $c->todep()->str();
+ printf "$c->{'count'} vendor changes from '%s' to '%s':\n", $c->{'fromstr'}, $c->{'tostr'};
} elsif ($c->{'type'} == $solv::Transaction::SOLVER_TRANSACTION_ARCHCHANGE) {
- printf "$c->{'count'} arch changes from '%s' to '%s':\n", $c->fromdep()->str(), $c->todep()->str();
+ printf "$c->{'count'} arch changes from '%s' to '%s':\n", $c->{'fromstr'}->str(), $c->{'tostr'};
} else {
next;
}
@@ -729,7 +729,7 @@ if (@newpkgs) {
}
print "Committing transaction:\n\n";
-$trans->order(0);
+$trans->order();
for my $p ($trans->steps()) {
my $steptype = $trans->steptype($p, $solv::Transaction::SOLVER_TRANSACTION_RPM_ONLY);
if ($steptype == $solv::Transaction::SOLVER_TRANSACTION_ERASE) {
diff --git a/examples/pysolv b/examples/pysolv
index f300d08..98dfec1 100755
--- a/examples/pysolv
+++ b/examples/pysolv
@@ -814,9 +814,9 @@ for cl in trans.classify(solv.Transaction.SOLVER_TRANSACTION_SHOW_OBSOLETES | so
elif cl.type == solv.Transaction.SOLVER_TRANSACTION_UPGRADED:
print "%d upgraded packages:" % cl.count
elif cl.type == solv.Transaction.SOLVER_TRANSACTION_VENDORCHANGE:
- print "%d vendor changes from '%s' to '%s':" % (cl.count, cl.fromdep(), cl.todep())
+ print "%d vendor changes from '%s' to '%s':" % (cl.count, cl.fromstr, cl.tostr)
elif cl.type == solv.Transaction.SOLVER_TRANSACTION_ARCHCHANGE:
- print "%d arch changes from '%s' to '%s':" % (cl.count, cl.fromdep(), cl.todep())
+ print "%d arch changes from '%s' to '%s':" % (cl.count, cl.fromstr, cl.tostr)
else:
continue
for p in cl.solvables():
diff --git a/examples/rbsolv b/examples/rbsolv
index e011010..e10e0fd 100755
--- a/examples/rbsolv
+++ b/examples/rbsolv
@@ -695,9 +695,9 @@ for cl in trans.classify(Solv::Transaction::SOLVER_TRANSACTION_SHOW_OBSOLETES |
elsif cl.type == Solv::Transaction::SOLVER_TRANSACTION_UPGRADED
puts "#{cl.count} upgraded packages:"
elsif cl.type == Solv::Transaction::SOLVER_TRANSACTION_VENDORCHANGE
- puts "#{cl.count} vendor changes from '#{cl.fromdep}' to '#{cl.todep}':"
+ puts "#{cl.count} vendor changes from '#{cl.fromstr}' to '#{cl.tostr}':"
elsif cl.type == Solv::Transaction::SOLVER_TRANSACTION_ARCHCHANGE
- puts "#{cl.count} arch changes from '#{cl.fromdep}' to '#{cl.todep}':"
+ puts "#{cl.count} arch changes from '#{cl.fromstr}' to '#{cl.tostr}':"
else
next
end
@@ -745,7 +745,7 @@ end
puts "Committing transaction:"
puts
-trans.order(0)
+trans.order()
for p in trans.steps
steptype = trans.steptype(p, Solv::Transaction::SOLVER_TRANSACTION_RPM_ONLY)
if steptype == Solv::Transaction::SOLVER_TRANSACTION_ERASE