first non-working code for package provision
authorJosef Reidinger <jreidinger@suse.cz>
Mon, 13 Feb 2012 12:29:55 +0000 (13:29 +0100)
committerJosef Reidinger <jreidinger@suse.cz>
Mon, 13 Feb 2012 12:29:55 +0000 (13:29 +0100)
swig/PackageProvider.i [new file with mode: 0644]
swig/ruby/tests/target.rb
swig/zypp.i

diff --git a/swig/PackageProvider.i b/swig/PackageProvider.i
new file mode 100644 (file)
index 0000000..4d290dd
--- /dev/null
@@ -0,0 +1 @@
+%include <zypp/repo/PackageProvider.h>
index 0ea0bc0..31b4396 100644 (file)
@@ -55,6 +55,13 @@ class LoadTest < Test::Unit::TestCase
       assert pi.is_a? PoolItem
       r = pi.resolvable
       assert_equal "libzypp",r.name
+      #try to download it
+      pkg = asKindPackage(pi)
+      puts RepoMediaAccess.new().class
+      puts pkg.class
+      puts DeltaCandidates.new().class
+      puts pkg.distribution
+      path = PackageProvider.new(RepoMediaAccess.new(),asKindPackage(pi),DeltaCandidates.new()).providePackage
     end
 
     assert true
index 08d573b..a84ca38 100644 (file)
@@ -127,6 +127,7 @@ SWIGINTERNINLINE SV *SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value);
 #include "zypp/ServiceInfo.h"
 #include "zypp/RepoManager.h"
 #include "zypp/repo/RepoType.h"
+#include "zypp/repo/PackageProvider.h"
 #include "zypp/TmpPath.h"
 #include "zypp/Resolver.h"
 #include "zypp/pool/GetResolvablesToInsDel.h"
@@ -230,6 +231,7 @@ namespace zypp {
 %include "ResStatus.i"
 %include "ResObject.i"
 %include "Package.i"
+%include "PackageProvider.i"
 %include "Patch.i"
 %include "Pattern.i"
 %include "Product.i"
@@ -249,6 +251,10 @@ namespace zypp {
 %include "Resolver.i"
 %include "ZConfig.i"
 
+//just simple files, where we need default ctor
+%include <zypp/repo/RepoProvideFile.h>
+%include <zypp/repo/DeltaCandidates.h>
+
 %ignore zypp::ZYpp::setTextLocale;
 %ignore zypp::ZYpp::getTextLocale;
 %ignore zypp::ZYpp::setRequestedLocales;