commit libzypp-bindings for openSUSE:Factory
Hello community,
here is the log from the commit of package libzypp-bindings for openSUSE:Factory checked in at 2012-03-06 13:39:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp-bindings (Old)
and /work/SRC/openSUSE:Factory/.libzypp-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzypp-bindings", Maintainer is "DMacVicar@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp-bindings/libzypp-bindings.changes 2011-10-19 14:07:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp-bindings.new/libzypp-bindings.changes 2012-03-06 13:39:14.000000000 +0100
@@ -1,0 +2,9 @@
+Tue Feb 28 13:16:22 UTC 2012 - jreidinger@suse.com
+
+- fix iteration over pool in ruby (bnc#746439)
+- add ability to use PackageProvider via bindings
+- predefine class for ZyppException in ruby so it can be used after
+ require of zypp
+- version 0.5.11
+
+-------------------------------------------------------------------
Old:
----
libzypp-bindings-0.5.10.tar.bz2
New:
----
libzypp-bindings-0.5.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp-bindings.spec ++++++
--- /var/tmp/diff_new_pack.Npyu73/_old 2012-03-06 13:39:16.000000000 +0100
+++ /var/tmp/diff_new_pack.Npyu73/_new 2012-03-06 13:39:16.000000000 +0100
@@ -18,9 +18,9 @@
# nodebuginfo
Name: libzypp-bindings
-Version: 0.5.10
+Version: 0.5.11
Release: 0
-License: GPLv2+
+License: GPL-2.0+
Summary: Bindings for libzypp
Group: Development/Sources
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -63,7 +63,7 @@
%{__rm} -rf %{buildroot}
%package -n ruby-zypp
-License: GPLv2+
+License: GPL-2.0+
Summary: Ruby bindings for libzypp
Group: Development/Languages/Ruby
@@ -80,7 +80,7 @@
%endif
%package -n python-zypp
-License: GPLv2+
+License: GPL-2.0+
Summary: Python bindings for libzypp
Group: Development/Languages/Python
%description -n python-zypp
@@ -92,7 +92,7 @@
%{py_sitedir}/zypp.py
%package -n perl-zypp
-License: GPLv2+
+License: GPL-2.0+
Requires: perl = %{perl_version}
Summary: Perl bindings for libzypp
Group: Development/Languages/Perl
++++++ libzypp-bindings-0.5.10.tar.bz2 -> libzypp-bindings-0.5.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/VERSION.cmake new/libzypp-bindings-0.5.11/VERSION.cmake
--- old/libzypp-bindings-0.5.10/VERSION.cmake 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/VERSION.cmake 2012-03-02 11:41:30.000000000 +0100
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "5")
-SET(VERSION_PATCH "10")
+SET(VERSION_PATCH "11")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/examples/ruby/download_rpms.rb new/libzypp-bindings-0.5.11/examples/ruby/download_rpms.rb
--- old/libzypp-bindings-0.5.10/examples/ruby/download_rpms.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.5.11/examples/ruby/download_rpms.rb 2012-03-02 11:41:30.000000000 +0100
@@ -0,0 +1,43 @@
+#!/usr/bin/ruby
+
+require 'tmpdir'
+require 'zypp'
+include Zypp
+
+def initialize_repo dir
+ rm_opts = RepoManagerOptions.new Pathname.new(dir)
+ repo_manager = RepoManager.new rm_opts
+ #ignore certificate issues
+ KeyRing.setDefaultAccept( KeyRing::ACCEPT_UNKNOWNKEY |
+ KeyRing::ACCEPT_VERIFICATION_FAILED | KeyRing::ACCEPT_UNSIGNED_FILE |
+ KeyRing::TRUST_KEY_TEMPORARILY )
+ repo_info = RepoInfo.new
+ url = Zypp::Url.new "http://download.opensuse.org/distribution/openSUSE-stable/repo/oss"
+ repo_info.setBaseUrl(url)
+ repo_info.setKeepPackages(true)
+ repo_alias = "repo"
+ repo_info.setAlias repo_alias
+ repo_manager.addRepository repo_info
+ repo_manager.refreshMetadata repo_info
+ repo_manager.buildCache repo_info
+ repo_manager.loadFromCache repo_info
+ return repo_manager
+end
+
+Dir.mktmpdir do |dir|
+ #do not lock global zypp
+ ENV["ZYPP_LOCKFILE_ROOT"] = dir
+ zypp = ZYppFactory.instance.getZYpp
+ zypp.initializeTarget Pathname.new dir
+ puts "initialize repository. It can take serious amount of time"
+ repo_manager = initialize_repo dir
+ rma = RepoMediaAccess.new
+ zypp.pool.each_by_name("libzypp") do |pi|
+ r = pi.resolvable
+ puts "downloading rpm for #{r.name}-#{r.edition}"
+ path = PackageProvider.provide(rma,asKindPackage(pi))
+ FileUtils.cp path.to_s,dir
+ end
+ puts "downloaded files:"
+ puts `ls -l #{dir}/*.rpm`
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/libzypp-bindings.spec.cmake new/libzypp-bindings-0.5.11/libzypp-bindings.spec.cmake
--- old/libzypp-bindings-0.5.10/libzypp-bindings.spec.cmake 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/libzypp-bindings.spec.cmake 2012-03-02 11:41:30.000000000 +0100
@@ -20,7 +20,7 @@
Name: @PACKAGE@
Version: @VERSION@
Release: 0
-License: GPLv2+
+License: GPL-2.0+
Summary: Bindings for libzypp
Group: Development/Sources
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -63,7 +63,7 @@
%{__rm} -rf %{buildroot}
%package -n ruby-zypp
-License: GPLv2+
+License: GPL-2.0+
Summary: Ruby bindings for libzypp
Group: Development/Languages/Ruby
@@ -80,7 +80,7 @@
%endif
%package -n python-zypp
-License: GPLv2+
+License: GPL-2.0+
Summary: Python bindings for libzypp
Group: Development/Languages/Python
%description -n python-zypp
@@ -92,7 +92,7 @@
%{py_sitedir}/zypp.py
%package -n perl-zypp
-License: GPLv2+
+License: GPL-2.0+
Requires: perl = %{perl_version}
Summary: Perl bindings for libzypp
Group: Development/Languages/Perl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/package/libzypp-bindings.changes new/libzypp-bindings-0.5.11/package/libzypp-bindings.changes
--- old/libzypp-bindings-0.5.10/package/libzypp-bindings.changes 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/package/libzypp-bindings.changes 2012-03-02 11:41:30.000000000 +0100
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Tue Feb 28 13:16:22 UTC 2012 - jreidinger@suse.com
+
+- fix iteration over pool in ruby (bnc#746439)
+- add ability to use PackageProvider via bindings
+- predefine class for ZyppException in ruby so it can be used after
+ require of zypp
+- version 0.5.11
+
+-------------------------------------------------------------------
Tue Oct 18 16:54:42 CEST 2011 - ma@suse.de
- Add arch armv7hl, armv7nhl, armv7thl, armv7tnhl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/swig/Callbacks.i new/libzypp-bindings-0.5.11/swig/Callbacks.i
--- old/libzypp-bindings-0.5.10/swig/Callbacks.i 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/swig/Callbacks.i 2012-03-02 11:41:30.000000000 +0100
@@ -34,6 +34,8 @@
if (value == Qnil)
value = ID2SYM(rb_intern("abort"));
return value;
+#else
+ return Target_String("abort");
#endif
return 0; // fallback
}
@@ -45,6 +47,8 @@
if (value == Qnil)
value = ID2SYM(rb_intern("retry"));
return value;
+#else
+ return Target_String("retry");
#endif
return 0; // fallback
}
@@ -56,6 +60,8 @@
if (value == Qnil)
value = ID2SYM(rb_intern("ignore"));
return value;
+#else
+ return Target_String("ignore");
#endif
return 0; // fallback
}
@@ -73,8 +79,7 @@
if (value == Qnil)
value = ID2SYM(rb_intern("no_error"));
return value;
-#endif
-#if defined(SWIGPYTHON)
+#else
return Target_String("no_error");
#endif
return 0; // fallback
@@ -87,8 +92,7 @@
if (value == Qnil)
value = ID2SYM(rb_intern("not_found"));
return value;
-#endif
-#if defined(SWIGPYTHON)
+#else
return Target_String("not_found");
#endif
return 0; // fallback
@@ -101,8 +105,7 @@
if (value == Qnil)
value = ID2SYM(rb_intern("io"));
return value;
-#endif
-#if defined(SWIGPYTHON)
+#else
return Target_String("io");
#endif
return 0; // fallback
@@ -115,8 +118,7 @@
if (value == Qnil)
value = ID2SYM(rb_intern("invalid"));
return value;
-#endif
-#if defined(SWIGPYTHON)
+#else
return Target_String("invalid");
#endif
return 0; // fallback
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/swig/PackageProvider.i new/libzypp-bindings-0.5.11/swig/PackageProvider.i
--- old/libzypp-bindings-0.5.10/swig/PackageProvider.i 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.5.11/swig/PackageProvider.i 2012-03-02 11:41:30.000000000 +0100
@@ -0,0 +1,26 @@
+%inline
+{
+ namespace zypp
+ {
+ class WrappedManagedFile
+ {
+ public:
+ WrappedManagedFile(ManagedFile managed_file){ mf = managed_file; }
+ const std::string & asString(){ return mf->asString();}
+ private:
+ ManagedFile mf;
+ };
+ }
+}
+%include "zypp/repo/PackageProvider.h"
+%extend zypp::repo::PackageProvider {
+ static zypp::WrappedManagedFile* provide( zypp::repo::RepoMediaAccess & rm, const zypp::Package_constPtr pkg )
+ {
+ zypp::Package::constPtr pkg_type(pkg);
+ zypp::repo::DeltaCandidates dc;
+ zypp::repo::PackageProvider pp(rm,pkg_type,dc);
+ zypp::ManagedFile mf = pp.providePackage();
+ zypp::WrappedManagedFile* res = new zypp::WrappedManagedFile(mf);
+ return res;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/swig/ResPool.i new/libzypp-bindings-0.5.11/swig/ResPool.i
--- old/libzypp-bindings-0.5.10/swig/ResPool.i 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/swig/ResPool.i 2012-03-02 11:41:30.000000000 +0100
@@ -25,25 +25,25 @@
#ifdef SWIGRUBY
-iter3(ResPool, PoolItem*);
+iter3(ResPool, zypp::PoolItem*);
// %extend ResPool {
// void each()
// {
// ResPool::const_iterator i = self->begin();
// while ( i != self->end() ) {
-// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
+// rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
// ++i;
// }
// }
// }
%extend ResPool {
- void each_by_kind( const ResObject::Kind & kind_r )
+ void each_by_kind( const ResKind & kind_r )
{
ResPool::byKind_iterator i = self->byKindBegin( kind_r );
while ( i != self->byKindEnd( kind_r ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_PoolItem, 0));
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
++i;
}
}
@@ -54,7 +54,7 @@
{
ResPool::byName_iterator i = self->byNameBegin( name );
while ( i != self->byNameEnd( name ) ) {
- rb_yield( SWIG_NewPointerObj( (void *) &*i, $descriptor(PoolItem), 0));
+ rb_yield( SWIG_NewPointerObj( (void *) &*i, SWIGTYPE_p_zypp__PoolItem, 0));
++i;
}
}
@@ -65,17 +65,29 @@
#ifdef SWIGPYTHON
%newobject ResPool::const_iterator(PyObject **PYTHON_SELF);
%extend ResPool {
+#if SWIG_VERSION > 0x010336
swig::SwigPyIterator* iterator(PyObject **PYTHON_SELF)
+#else
+ swig::PySwigIterator* iterator(PyObject **PYTHON_SELF)
+#endif
{
return swig::make_output_iterator(self->begin(), self->begin(),
self->end(), *PYTHON_SELF);
}
+#if SWIG_VERSION > 0x010336
swig::SwigPyIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
+#else
+ swig::PySwigIterator* kinditerator(PyObject **PYTHON_SELF, const ResObject::Kind & kind_r)
+#endif
{
return swig::make_output_iterator(self->byKindBegin( kind_r ), self->byKindBegin( kind_r ),
self->byKindEnd( kind_r ), *PYTHON_SELF);
}
+#if SWIG_VERSION > 0x010336
swig::SwigPyIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
+#else
+ swig::PySwigIterator* nameiterator(PyObject **PYTHON_SELF, const std::string &name)
+#endif
{
return swig::make_output_iterator(self->byNameBegin( name ), self->byNameBegin( name ),
self->byNameEnd( name ), *PYTHON_SELF);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzypp-bindings-0.5.10/swig/Target.i new/libzypp-bindings-0.5.11/swig/Target.i
--- old/libzypp-bindings-0.5.10/swig/Target.i 2011-10-18 18:35:54.000000000 +0200
+++ new/libzypp-bindings-0.5.11/swig/Target.i 2012-03-02 11:41:30.000000000 +0100
@@ -1,18 +1,15 @@
%ignore zypp::Target::reset;
-#if ZYPP_VERSION > 631
namespace zypp
{
// Redefine nested class in global scope for SWIG
struct DistributionLabel {};
}
-#endif
%include
participants (1)
-
root@hilbert.suse.de