ref: refs/heads/master
commit 04415ce3689d2dc45874ae0f7f9d71f2578eb9b2
Author: Klaus Kämpf
Date: Wed Mar 25 11:14:48 2009 +0100
provide 'Solver.sizechange' to compute the changes of the installed
size after a transaction is applied.
---
bindings/ruby/tests/solver.rb | 2 ++
bindings/solver.i | 12 ++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/bindings/ruby/tests/solver.rb b/bindings/ruby/tests/solver.rb
index 81cc606..104c573 100644
--- a/bindings/ruby/tests/solver.rb
+++ b/bindings/ruby/tests/solver.rb
@@ -25,6 +25,8 @@ class SolverTest < Test::Unit::TestCase
assert solver.allow_uninstall
pool.prepare
solver.solve( transaction )
+ assert solver.sizechange
+ puts "Size change #{solver.sizechange}"
solver.each_to_install { |s|
puts "Install #{s}"
}
diff --git a/bindings/solver.i b/bindings/solver.i
index 3bc9748..313c103 100644
--- a/bindings/solver.i
+++ b/bindings/solver.i
@@ -837,6 +837,18 @@ typedef struct solver {} Solver;
#endif
/*
+ * Return the size change of the installed system
+ *
+ * This is how much disk space gets allocated/freed after the
+ * solver decisions are applied to the system.
+ *
+ */
+ long sizechange()
+ {
+ return solver_calc_installsizechange($self);
+ }
+
+ /*
* Document-method; explain
*
* Explain a decision
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org