Hello community,
here is the log from the commit of package libzypp-bindings
checked in at Fri Oct 5 00:36:19 CEST 2007.
--------
--- libzypp-bindings/libzypp-bindings.changes 2007-09-17 19:19:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp-bindings/libzypp-bindings.changes 2007-10-04 11:59:35.291287000 +0200
@@ -1,0 +2,5 @@
+Thu Oct 04 11:44:18 CEST 2007 - aschnell@suse.de
+
+- don't generate a debuginfo package (bug #297711)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzypp-bindings.spec ++++++
--- /var/tmp/diff_new_pack.r26743/_old 2007-10-05 00:36:08.000000000 +0200
+++ /var/tmp/diff_new_pack.r26743/_new 2007-10-05 00:36:08.000000000 +0200
@@ -8,10 +8,11 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# nodebuginfo
Name: libzypp-bindings
Version: 0.4.2
-Release: 5
+Release: 6
License: GPL v2 or later
Summary: Bindings for libzypp
Group: Development/Sources
@@ -113,14 +114,16 @@
Duncan Mac-Vicar
Klaus K�mpf
Arvin Schnell
+ Stefan Haas
%files -n perl-zypp
%defattr(-,root,root,-)
/usr/lib/perl5/*/*/zypp.pm
/usr/lib/perl5/*/*/zypp.so
-
%changelog
+* Thu Oct 04 2007 - aschnell@suse.de
+- don't generate a debuginfo package (bug #297711)
* Mon Sep 17 2007 - aschnell@suse.de
- generate Perl bindings
- use ZYpp Url class
++++++ libzypp-bindings-0.4.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/python/bytecount.py new/libzypp-bindings-0.4.2/examples/python/bytecount.py
--- old/libzypp-bindings-0.4.2/examples/python/bytecount.py 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.4.2/examples/python/bytecount.py 2007-10-04 12:01:48.000000000 +0200
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+from zypp import ByteCount
+
+print ByteCount(ByteCount.G)
+print ByteCount(ByteCount.GB)
+
+x = ByteCount(ByteCount.K)
+print int(x)
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/python/exception.py new/libzypp-bindings-0.4.2/examples/python/exception.py
--- old/libzypp-bindings-0.4.2/examples/python/exception.py 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.4.2/examples/python/exception.py 2007-10-04 12:01:48.000000000 +0200
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+from zypp import TmpDir, RepoManagerOptions, RepoManager, RepoInfo, Url
+
+tmp_cache_path = TmpDir()
+tmp_raw_cache_path = TmpDir()
+tmp_known_repos_path = TmpDir()
+
+opts = RepoManagerOptions()
+opts.repoCachePath = tmp_cache_path.path()
+opts.repoRawCachePath = tmp_raw_cache_path.path()
+opts.knownReposPath = tmp_known_repos_path.path()
+
+repo_manager = RepoManager(opts)
+
+repo_info = RepoInfo()
+
+repo_info.setAlias("factorytest")
+repo_info.setName("Test Repo for Factory.")
+repo_info.setEnabled(True)
+repo_info.setAutorefresh(False)
+repo_info.addBaseUrl(Url("file:///tmp/does-not-exist"))
+
+try:
+ repo_manager.addRepository(repo_info)
+ repo_manager.refreshMetadata(repo_info)
+ repo_manager.buildCache(repo_info)
+except RuntimeError, strerror:
+ print "RuntimeError"
+ print strerror
+else:
+ print "Oh, no exception"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/python/url.py new/libzypp-bindings-0.4.2/examples/python/url.py
--- old/libzypp-bindings-0.4.2/examples/python/url.py 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.4.2/examples/python/url.py 2007-10-04 12:01:48.000000000 +0200
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+from zypp import Url
+
+a = Url("http://www.suse.de/download")
+print "a = %s" % a
+print " %s %s %s" % (a.getScheme(), a.getHost(), a.getPathData())
+
+b = Url(a)
+b.setHost("download.novell.com")
+print "b = %s" % b
+
+c = a # oops
+c.setPathData("/repository")
+print "c = %s" % c
+
+print
+print "a = %s" % a # oops
+print "b = %s" % b
+print "c = %s" % c
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/ruby/bytecount.rb new/libzypp-bindings-0.4.2/examples/ruby/bytecount.rb
--- old/libzypp-bindings-0.4.2/examples/ruby/bytecount.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.4.2/examples/ruby/bytecount.rb 2007-10-04 12:01:48.000000000 +0200
@@ -0,0 +1,11 @@
+#!/usr/bin/ruby
+
+require 'zypp'
+include Zypp
+
+puts ByteCount.new(ByteCount.G)
+puts ByteCount.new(ByteCount.GB)
+
+x = ByteCount.new(ByteCount.K)
+puts x.to_i
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/ruby/exception.rb new/libzypp-bindings-0.4.2/examples/ruby/exception.rb
--- old/libzypp-bindings-0.4.2/examples/ruby/exception.rb 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/exception.rb 2007-10-04 12:01:48.000000000 +0200
@@ -20,7 +20,7 @@
repo_info.set_name("Test Repo for Factory.")
repo_info.set_enabled(true)
repo_info.set_autorefresh(false)
-repo_info.add_base_url("file:///tmp/does-not-exist")
+repo_info.add_base_url(Url.new("file:///tmp/does-not-exist"))
begin
repo_manager.add_repository(repo_info)
@@ -28,7 +28,7 @@
repo_manager.build_cache(repo_info)
rescue ZYppException => e
puts "ZYppException caught"
- puts e.to_s
+ puts e
else
puts "Oh, no exception"
end
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/examples/ruby/url.rb new/libzypp-bindings-0.4.2/examples/ruby/url.rb
--- old/libzypp-bindings-0.4.2/examples/ruby/url.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/libzypp-bindings-0.4.2/examples/ruby/url.rb 2007-10-04 12:01:48.000000000 +0200
@@ -0,0 +1,22 @@
+#!/usr/bin/ruby
+
+require 'zypp'
+include Zypp
+
+a = Url.new("http://www.suse.de/download")
+puts "a = #{a}"
+puts " #{a.get_scheme} #{a.get_host} #{a.get_path_data}"
+
+b = Url.new(a)
+b.set_host("download.novell.com")
+puts "b = #{b}"
+
+c = a # oops
+c.set_path_data("/repository")
+puts "c = #{c}"
+
+puts
+puts "a = #{a}" # oops
+puts "b = #{b}"
+puts "c = #{c}"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake new/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake
--- old/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake 2007-10-04 12:01:48.000000000 +0200
@@ -8,6 +8,8 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+# nodebuginfo
+
Name: @PACKAGE@
Version: @VERSION@
Release: 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Arch.i new/libzypp-bindings-0.4.2/swig/Arch.i
--- old/libzypp-bindings-0.4.2/swig/Arch.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Arch.i 2007-10-04 12:01:48.000000000 +0200
@@ -3,10 +3,6 @@
%ignore Arch::compare(const Arch &, const Arch &);
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Arch::asString "__str__";
-#endif
-
class Arch
{
public:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/ByteCount.i new/libzypp-bindings-0.4.2/swig/ByteCount.i
--- old/libzypp-bindings-0.4.2/swig/ByteCount.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ByteCount.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,24 +1,49 @@
+
#ifdef SWIGRUBY
-%typemap(in) ByteCount {
- ByteCount::SizeType bytes = (Date::SizeType) NUM2LONG( rb_funcall( $input, rb_intern("to_i"), 0, 0) );
- $1 = ByteCount(bytes);
+namespace zypp
+{
+ // how to do that?
+ // %rename "ByteCount::operator SizeType()" to_i;
}
-%typemap(out) ByteCount {
- VALUE rbbytenum = INT2NUM( (ByteCount::SizeType) $1 );
- return rbbytenum;
+#endif
+
+
+// TODO: tell make about dependencies
+%include
+
+
+#ifdef SWIGRUBY
+
+namespace zypp
+{
+ %extend ByteCount
+ {
+ long long int to_i()
+ {
+ ByteCount::SizeType tmp = *self;
+ return tmp;
+ }
+ }
}
#endif
-#ifdef SWIGPERL5
+#ifdef SWIGPYTHON
-%typemap(out) ByteCount {
- $result = sv_newmortal();
- sv_setiv($result, (IV) (ByteCount::SizeType) $1 );
- argvi++;
+namespace zypp
+{
+ %extend ByteCount
+ {
+ long long int __int__()
+ {
+ ByteCount::SizeType tmp = *self;
+ return tmp;
+ }
+ }
}
#endif
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Capability.i new/libzypp-bindings-0.4.2/swig/Capability.i
--- old/libzypp-bindings-0.4.2/swig/Capability.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Capability.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,8 +1,4 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Capability::asString "__str__";
-#endif
-
class Capability
{
public:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/CapFactory.i new/libzypp-bindings-0.4.2/swig/CapFactory.i
--- old/libzypp-bindings-0.4.2/swig/CapFactory.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/CapFactory.i 2007-10-04 12:01:48.000000000 +0200
@@ -32,7 +32,7 @@
Capability parse( const Resolvable::Kind & refers_r,
const std::string & name_r,
Rel op_r,
- const Edition & edition_r ) const;
+ const zypp::Edition & edition_r ) const;
/** Special Capability, triggering evaluation of Hal
* capabilities when matched.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Date.i new/libzypp-bindings-0.4.2/swig/Date.i
--- old/libzypp-bindings-0.4.2/swig/Date.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Date.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,20 +1,4 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Date::asString "__str__";
-#endif
-
-class Date
-{
-public:
-
- Date();
- Date(const std::string & seconds_r);
-
- static Date now();
-
- std::string form(const std::string & format_r) const;
- std::string asString() const;
- std::string asSeconds() const;
-
-};
+// TODO: tell make about dependencies
+%include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Dep.i new/libzypp-bindings-0.4.2/swig/Dep.i
--- old/libzypp-bindings-0.4.2/swig/Dep.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Dep.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,8 +1,4 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Dep::asString "__str__";
-#endif
-
struct Dep
{
/** \name Dependency types
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Edition.i new/libzypp-bindings-0.4.2/swig/Edition.i
--- old/libzypp-bindings-0.4.2/swig/Edition.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Edition.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,37 +1,52 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Edition::asString "__str__";
-#endif
+// example for including the original header file
+
+#if 1
+
+namespace zypp
+{
+ %rename Edition::compare(const Edition& lhs, const Edition& rhs) compare2;
+ %rename Edition::match(const Edition& lhs, const Edition& rhs) match2;
+}
-class Edition
+// TODO: tell make about dependencies
+%include
+
+#else
+
+namespace zypp
{
- public:
- typedef unsigned epoch_t;
- static const epoch_t noepoch = 0;
- static const Edition noedition;
- public:
- Edition();
-
- Edition( const std::string & edition_r );
- Edition( const std::string & version_r,
- const std::string & release_r,
- epoch_t epoch_r = noepoch );
- Edition( const std::string & version_r,
- const std::string & release_r,
- const std::string & epoch_r );
- ~Edition();
- public:
- epoch_t epoch() const;
- const std::string & version() const;
- const std::string & release() const;
- std::string asString() const;
- public:
- static int compare( const Edition & lhs, const Edition & rhs );
- int compare( const Edition & rhs ) const;
- typedef Compare<Edition> Compare;
- typedef Range<Edition> CompareRange;
- public:
- static int match( const Edition & lhs, const Edition & rhs );
- int match( const Edition & rhs ) const;
-};
+ class Edition
+ {
+ public:
+ typedef unsigned epoch_t;
+ static const epoch_t noepoch = 0;
+ static const Edition noedition;
+ public:
+ Edition();
+ Edition( const std::string & edition_r );
+ Edition( const std::string & version_r,
+ const std::string & release_r,
+ epoch_t epoch_r = noepoch );
+ Edition( const std::string & version_r,
+ const std::string & release_r,
+ const std::string & epoch_r );
+ ~Edition();
+ public:
+ epoch_t epoch() const;
+ const std::string & version() const;
+ const std::string & release() const;
+ std::string asString() const;
+ public:
+ static int compare( const Edition & lhs, const Edition & rhs );
+ int compare( const Edition & rhs ) const;
+ typedef Compare<Edition> Compare;
+ typedef Range<Edition> CompareRange;
+ public:
+ static int match( const Edition & lhs, const Edition & rhs );
+ int match( const Edition & rhs ) const;
+ };
+}
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/ItemCapKind.i new/libzypp-bindings-0.4.2/swig/ItemCapKind.i
--- old/libzypp-bindings-0.4.2/swig/ItemCapKind.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ItemCapKind.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,58 +1,48 @@
-/*%{
-
-struct solver::detail::ItemCapKind
-{
- public:
- Capability cap; //Capability which has triggerd this selection
- Dep capKind; //Kind of that capability
- PoolItem_Ref item; //Item which has triggered this selection
- bool initialInstallation; //This item has triggered the installation
- //Not already fullfilled requierement only.
-
- ItemCapKind( PoolItem i, Capability c, Dep k, bool initial)
- : cap( c )
- , capKind( k )
- , item( i )
- , initialInstallation( initial )
- { }
-};
-//typedef std::listsolver::detail::ItemCapKind solver::detail::ItemCapKindList;
-%}
-*/
+%template(ItemCapKindList) std::listsolver::detail::ItemCapKind;
-namespace zypp
+namespace solver
{
- namespace solver
+ namespace detail
{
- namespace detail
- {
-
- struct ItemCapKind
- {
- public:
- Capability cap;
- Dep capKind;
- PoolItem_Ref item;
- bool initialInstallation;
-
- /*%extend {
- ItemCapKind(){};
- }*/
- //ItemCapKind();
- ItemCapKind( PoolItem i, Capability c, Dep k, bool initial)
- : cap( c )
- , capKind( k )
- , item( i )
- , initialInstallation( initial )
- { }
- };
+ struct ItemCapKind
+ {
+ public:
+ Capability cap;
+ Dep capKind;
+ PoolItem_Ref item;
+ bool initialInstallation;
+
+ /*%extend {
+ ItemCapKind(){};
+ }*/
+
+ //ItemCapKind();
+ ItemCapKind( PoolItem i, Capability c, Dep k, bool initial)
+ : cap( c )
+ , capKind( k )
+ , item( i )
+ , initialInstallation( initial )
+ { }
+ };
+ #ifdef SWIGPERL5
+ %extend ItemCapKind {
+ PoolItem_Ref getItem(){
+ return self->item;
+ }
+ Capability getCap(){
+ return self->cap;
+ }
+ Dep getCapKind(){
+ return self->capKind;
}
+ bool getInitialInstallation(){
+ return self->initialInstallation;
+ }
+ };
+ #endif
}
}
-typedef std::listsolver::detail::ItemCapKind solver::detail::ItemCapKindList;
-%template(ItemCapKindList) std::listsolver::detail::ItemCapKind;
-
#ifdef SWIGRUBY
auto_iterator(std::listsolver::detail::ItemCapKind, solver::detail::ItemCapKind);
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/KeyRing.i new/libzypp-bindings-0.4.2/swig/KeyRing.i
--- old/libzypp-bindings-0.4.2/swig/KeyRing.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/KeyRing.i 2007-10-04 12:01:48.000000000 +0200
@@ -6,7 +6,7 @@
public:
- KeyRing(const Pathname& baseTmpDir);
+ KeyRing(const zypp::Pathname& baseTmpDir);
~KeyRing();
void importKey(const PublicKey& key, bool trusted = false);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/NVRAD.i new/libzypp-bindings-0.4.2/swig/NVRAD.i
--- old/libzypp-bindings-0.4.2/swig/NVRAD.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/NVRAD.i 2007-10-04 12:01:48.000000000 +0200
@@ -8,7 +8,7 @@
/** Ctor */
explicit
NVRAD( const std::string & name_r,
- const Edition & edition_r = Edition(),
+ const zypp::Edition & edition_r = zypp::Edition(),
const Arch & arch_r = Arch(),
const Dependencies & deps_r = Dependencies() )
: NVRA( name_r, edition_r, arch_r )
@@ -35,4 +35,4 @@
/** Ctor */
explicit
NVRAD( Resolvable::constPtr res_r );
- };
\ No newline at end of file
+ };
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/NVRA.i new/libzypp-bindings-0.4.2/swig/NVRA.i
--- old/libzypp-bindings-0.4.2/swig/NVRA.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/NVRA.i 2007-10-04 12:01:48.000000000 +0200
@@ -7,7 +7,7 @@
/** Ctor */
explicit
NVRA( const std::string & name_r,
- const Edition & edition_r = Edition(),
+ const zypp::Edition & edition_r = Edition(),
const Arch & arch_r = Arch() )
: NVR( name_r, edition_r )
, arch( arch_r )
@@ -37,4 +37,4 @@
return res;
return lhs.arch.compare( rhs.arch );
}
- };
\ No newline at end of file
+ };
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/NVR.i new/libzypp-bindings-0.4.2/swig/NVR.i
--- old/libzypp-bindings-0.4.2/swig/NVR.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/NVR.i 2007-10-04 12:01:48.000000000 +0200
@@ -7,7 +7,7 @@
/** Ctor */
explicit
NVR( const std::string & name_r,
- const Edition & edition_r = Edition() )
+ const zypp::Edition & edition_r = zypp::Edition() )
: name( name_r )
, edition( edition_r )
{}
@@ -19,7 +19,7 @@
/** */
std::string name;
/** */
- Edition edition;
+ zypp::Edition edition;
public:
/** Comparison mostly for std::container */
@@ -30,4 +30,4 @@
return res;
return lhs.edition.compare( rhs.edition );
}
- };
\ No newline at end of file
+ };
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Package.i new/libzypp-bindings-0.4.2/swig/Package.i
--- old/libzypp-bindings-0.4.2/swig/Package.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Package.i 2007-10-04 12:01:48.000000000 +0200
@@ -37,7 +37,7 @@
/** */
Text postun() const;
/** */
- ByteCount sourcesize() const;
+ zypp::ByteCount sourcesize() const;
/** */
std::liststd::string authors() const;
/** */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Pathname.i new/libzypp-bindings-0.4.2/swig/Pathname.i
--- old/libzypp-bindings-0.4.2/swig/Pathname.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Pathname.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,46 +1,18 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Pathname::asString "__str__";
-#endif
-
-class Pathname
+namespace zypp
{
-public:
-
- Pathname();
- Pathname(const std::string&);
- Pathname(const char*);
-
- const std::string & asString() const;
-
- bool empty() const;
- bool absolute() const;
- bool relative() const;
-
-};
-
+ namespace filesystem
+ {
+ %rename Pathname::dirname(const Pathname&) dirname1;
+ %rename Pathname::basename(const Pathname&) basename1;
+ %rename Pathname::extension(const Pathname&) extension1;
+ %rename Pathname::absolutename(const Pathname&) absolutename1;
+ %rename Pathname::relativename(const Pathname&) relativename1;
+ %rename Pathname::cat(const Pathname&, const Pathname&) cat2;
+ %rename Pathname::extend(const Pathname&, const std::string&) extend2;
+ }
+}
-// #ifdef SWIGRUBY
-//
-// // Something like 'opts.repoCachePath = tmp_cache_path.path()' causes out and
-// // in transformation. Can that be avoided?
-//
-// %typemap(in) const Pathname&, Pathname* {
-// VALUE pathstring = rb_funcall( $input, rb_intern("to_s"), 0, 0);
-// Pathname *p = new Pathname( (RSTRING(pathstring)->ptr) );
-// $1 = p;
-// }
-//
-// %typemap(freearg) const Pathname&, Pathname* {
-// delete $1;
-// }
-//
-// %typemap(out) Pathname {
-// rb_require("pathname");
-// VALUE klass = rb_const_get( rb_cObject, rb_intern("Pathname"));
-// VALUE rbpathstr = rb_str_new2($1.asString().c_str());
-// $result = rb_funcall( klass, rb_intern("new"), 1, rbpathstr);
-// }
-//
-// #endif
+// TODO: tell make about dependencies
+%include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/perl5/perl.i new/libzypp-bindings-0.4.2/swig/perl5/perl.i
--- old/libzypp-bindings-0.4.2/swig/perl5/perl.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/perl5/perl.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,3 +1,13 @@
+
+namespace zypp
+{
+ // These operators must be ignored otherwise the wrapper does
+ // not compile (using swig 1.3.29).
+ %ignore operator<<;
+ %ignore operator==;
+ %ignore operator!=;
+}
+
%define iter(cls, storetype)
%extend cls {
cls::const_iterator iterator_incr(cls::const_iterator *it){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/PublicKey.i new/libzypp-bindings-0.4.2/swig/PublicKey.i
--- old/libzypp-bindings-0.4.2/swig/PublicKey.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/PublicKey.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,15 +1,11 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename PublicKey::asString "__str__";
-#endif
-
class PublicKey
{
public:
PublicKey();
- PublicKey(const Pathname& file);
+ PublicKey(const zypp::Pathname& file);
~PublicKey();
bool isValid() const;
@@ -19,7 +15,7 @@
std::string id() const;
std::string name() const;
std::string fingerprint() const;
- Pathname path() const;
+ zypp::Pathname path() const;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/python/python.i new/libzypp-bindings-0.4.2/swig/python/python.i
--- old/libzypp-bindings-0.4.2/swig/python/python.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/python/python.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,4 +1,20 @@
+
+%rename *::asString "__str__";
+
+
+namespace zypp
+{
+ // These operators must be ignored otherwise the wrapper does
+ // not compile (using swig 1.3.29).
+ %ignore operator==;
+ %ignore operator!=;
+
+ // Just to avoid warnings.
+ %ignore operator<<;
+}
+
+
%define iter( cls )
%extend cls {
%pythoncode %{
@@ -11,3 +27,16 @@
};
%enddef
+
+%exception
+{
+ try {
+ $action
+ }
+ catch (const Exception& e) {
+ std::string tmp = e.historyAsString() + e.asUserString();
+ PyErr_SetString(PyExc_RuntimeError, const_cast(tmp.c_str()));
+ return NULL;
+ }
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/RepoInfo.i new/libzypp-bindings-0.4.2/swig/RepoInfo.i
--- old/libzypp-bindings-0.4.2/swig/RepoInfo.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/RepoInfo.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,6 +1,6 @@
#ifdef SWIGPERL5
#else
- %template(UrlSet) std::set<Url>;
+ %template(UrlSet) std::set<Url>;
#endif
class RepoInfo
@@ -71,7 +71,7 @@
* \note could be an empty pathname for repo
* infos created in memory.
*/
- Pathname filepath() const;
+ zypp::Pathname filepath() const;
/**
* Add a base url. \see baseUrls
@@ -79,13 +79,13 @@
*
* To edit or remove urls, create a new RepoInfo instead.
*/
- RepoInfo & addBaseUrl( const Url &url );
+ RepoInfo & addBaseUrl( const zypp::Url &url );
/**
* Set mirror list url. \see mirrorListUrl
* \param url The base url for the list
*/
- RepoInfo & setMirrorListUrl( const Url &url );
+ RepoInfo & setMirrorListUrl( const zypp::Url &url );
/**
* enable or disable the repository \see enabled
@@ -121,7 +121,7 @@
* \short set the repository filepath
* \param path File path
*/
- RepoInfo & setFilepath( const Pathname &filename );
+ RepoInfo & setFilepath( const zypp::Pathname &filename );
std::ostream & dumpOn( std::ostream & str ) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/RepoManager.i new/libzypp-bindings-0.4.2/swig/RepoManager.i
--- old/libzypp-bindings-0.4.2/swig/RepoManager.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/RepoManager.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,13 +1,13 @@
-
+
std::list<RepoInfo> readRepoFile(const Url & repo_file);
struct RepoManagerOptions
{
RepoManagerOptions();
-
- Pathname repoCachePath;
- Pathname repoRawCachePath;
- Pathname knownReposPath;
+
+ zypp::Pathname repoCachePath;
+ zypp::Pathname repoRawCachePath;
+ zypp::Pathname knownReposPath;
};
class RepoManager
@@ -15,24 +15,24 @@
public:
RepoManager( const RepoManagerOptions &options = RepoManagerOptions() );
~RepoManager();
-
+
enum RawMetadataRefreshPolicy
{
RefreshIfNeeded,
RefreshForced
};
-
+
enum CacheBuildPolicy
{
BuildIfNeeded,
BuildForced
};
-
+
enum RepoRemovePolicy
{
-
+
};
-
+
std::list<RepoInfo> knownRepositories() const;
void refreshMetadata( const RepoInfo &info,
RawMetadataRefreshPolicy policy = RefreshIfNeeded,
@@ -53,5 +53,5 @@
const ProgressData::ReceiverFnc & progressrcv = ProgressData::ReceiverFnc() );
void removeRepository( const RepoInfo & info,
const ProgressData::ReceiverFnc & progressrcv = ProgressData::ReceiverFnc() );
-
+
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/RepoType.i new/libzypp-bindings-0.4.2/swig/RepoType.i
--- old/libzypp-bindings-0.4.2/swig/RepoType.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/RepoType.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,8 +1,4 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename RepoType::asString "__str__";
-#endif
-
struct RepoType
{
static const RepoType RPMMD;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/ResObject.i new/libzypp-bindings-0.4.2/swig/ResObject.i
--- old/libzypp-bindings-0.4.2/swig/ResObject.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ResObject.i 2007-10-04 12:01:48.000000000 +0200
@@ -17,8 +17,8 @@
Text delnotify() const;
Text licenseToConfirm() const;
Vendor vendor() const;
- ByteCount size() const;
- ByteCount downloadSize() const;
+ zypp::ByteCount size() const;
+ zypp::ByteCount downloadSize() const;
Repository repository() const;
unsigned mediaNr() const;
bool installOnly() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Resolvable.i new/libzypp-bindings-0.4.2/swig/Resolvable.i
--- old/libzypp-bindings-0.4.2/swig/Resolvable.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Resolvable.i 2007-10-04 12:01:48.000000000 +0200
@@ -10,7 +10,7 @@
const Kind & kind() const;
const std::string & name() const;
- const Edition & edition() const;
+ const zypp::Edition & edition() const;
const Arch & arch() const;
const CapSet & dep( Dep which_r ) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/ResStatus.i new/libzypp-bindings-0.4.2/swig/ResStatus.i
--- old/libzypp-bindings-0.4.2/swig/ResStatus.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ResStatus.i 2007-10-04 12:01:48.000000000 +0200
@@ -379,5 +379,10 @@
{
return self->setToBeInstalled(ResStatus::USER);
}
+
+ bool resetTransactUser()
+ {
+ return self->resetTransact(ResStatus::USER);
+ }
};
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/ruby/ruby.i new/libzypp-bindings-0.4.2/swig/ruby/ruby.i
--- old/libzypp-bindings-0.4.2/swig/ruby/ruby.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ruby/ruby.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,5 +1,29 @@
+%rename *::asString "__str__";
+
+
+namespace zypp
+{
+ // Not ignoring gives a very strange error in the "pokus" testsuite: SWIG
+ // defines a Ruby module-function "==" which (when included into the main
+ // namespace) is apparently used where is should not.
+ %ignore operator==;
+
+ // Just to avoid warnings.
+ %ignore operator!=;
+ %ignore operator<<;
+
+ namespace filesystem
+ {
+ // Same as above.
+ %ignore operator==;
+ %ignore operator!=;
+ %ignore operator<<;
+ }
+}
+
+
/*
* Extend cls with an ruby-like each iterator and a to_a method. Yields
* objects of type storetype. Parameter storetype must be a pointer type.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Target.i new/libzypp-bindings-0.4.2/swig/Target.i
--- old/libzypp-bindings-0.4.2/swig/Target.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Target.i 2007-10-04 12:01:48.000000000 +0200
@@ -44,14 +44,14 @@
#ifndef STORAGE_DISABLED
/** enables the storage target */
bool isStorageEnabled() const;
- void enableStorage(const Pathname &root_r);
+ void enableStorage(const zypp::Pathname &root_r);
#endif
/** Set the log file for target */
- bool setInstallationLogfile(const Pathname & path_r);
+ bool setInstallationLogfile(const zypp::Pathname & path_r);
/** Return the root set for this target */
- Pathname root() const;
+ zypp::Pathname root() const;
/** return the last modification date of the target */
Date timestamp() const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/TmpPath.i new/libzypp-bindings-0.4.2/swig/TmpPath.i
--- old/libzypp-bindings-0.4.2/swig/TmpPath.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/TmpPath.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,45 +1,4 @@
-class TmpPath
-{
-public:
-
- TmpPath();
-
- explicit TmpPath( const Pathname & tmpPath_r );
-
- virtual ~TmpPath();
-
- Pathname path() const;
-
- static const Pathname & defaultLocation();
-
-};
-
-
-class TmpFile : public TmpPath
-{
-public:
-
- explicit TmpFile( const Pathname & inParentDir_r = defaultLocation(),
- const std::string & prefix_r = defaultPrefix() );
-
- static TmpFile makeSibling( const Pathname & sibling_r );
-
- static const std::string & defaultPrefix();
-
-};
-
-
-class TmpDir : public TmpPath
-{
-public:
-
- explicit TmpDir( const Pathname & inParentDir_r = defaultLocation(),
- const std::string & prefix_r = defaultPrefix() );
-
- static TmpDir makeSibling( const Pathname & sibling_r );
-
- static const std::string & defaultPrefix();
-
-};
+// TODO: tell make about dependencies
+%include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Url.i new/libzypp-bindings-0.4.2/swig/Url.i
--- old/libzypp-bindings-0.4.2/swig/Url.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Url.i 2007-10-04 12:01:48.000000000 +0200
@@ -1,20 +1,30 @@
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Url::asString "__str__";
-#endif
+// example for including the original header file
+
+#if 1
+
+// TODO: tell make about dependencies
+%include
-class Url
+#else
+
+namespace zypp
{
-public:
+ class Url
+ {
+ public:
- Url();
- ~Url();
+ Url();
+ ~Url();
- Url(const std::string& encodedUrl);
+ Url(const Url &url);
+ Url(const std::string &encodedUrl);
- bool isValid() const;
+ bool isValid() const;
- std::string asString() const;
+ std::string asString() const;
-};
+ };
+}
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/Url.i.new new/libzypp-bindings-0.4.2/swig/Url.i.new
--- old/libzypp-bindings-0.4.2/swig/Url.i.new 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Url.i.new 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-
-#if defined(SWIGPYTHON) || defined(SWIGRUBY)
-%rename Url::asString "__str__";
-#endif
-
-class Url
-{
-public:
-
- Url();
- ~Url();
-
- Url(const std::string& encodedUrl);
-
- bool isValid() const;
-
- std::string asString() const;
-
-};
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.2/swig/zypp.i new/libzypp-bindings-0.4.2/swig/zypp.i
--- old/libzypp-bindings-0.4.2/swig/zypp.i 2007-09-17 19:09:25.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/zypp.i 2007-10-04 12:01:48.000000000 +0200
@@ -43,6 +43,7 @@
typedef std::set<Url> UrlSet;
typedef std::liststd::string StringList;
+typedef std::listsolver::detail::ItemCapKind ItemCapKindList;
%}
%rename("+") "operator+";
@@ -119,8 +120,8 @@
%include "ZYppCommitPolicy.i"
%include "ZYppCommitResult.i"
%include "TmpPath.i"
-%include "Resolver.i"
%include "ItemCapKind.i"
+%include "Resolver.i"
class ZYpp
@@ -143,7 +144,7 @@
void setPartitions(const DiskUsageCounter::MountPointSet &mp);
*/
Target_Ptr target() const;
- void initializeTarget(const Pathname & root);
+ void initializeTarget(const zypp::Pathname & root);
void finishTarget();
typedef ZYppCommitResult CommitResult;
@@ -161,9 +162,9 @@
LocaleSet getAvailableLocales() const;
void availableLocale( const Locale & locale_r );
*/
- Pathname homePath() const;
- Pathname tmpPath() const;
- void setHomePath( const Pathname & path );
+ zypp::Pathname homePath() const;
+ zypp::Pathname tmpPath() const;
+ void setHomePath( const zypp::Pathname & path );
Arch architecture() const;
void setArchitecture( const Arch & arch );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org