Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit libzypp-bindings
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 24 Aug 2007 01:41:44 +0200
  • Message-id: <20070823234145.28A9A6781B8@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package libzypp-bindings
checked in at Fri Aug 24 01:41:44 CEST 2007.

--------
--- libzypp-bindings/libzypp-bindings.changes   2007-08-17 14:48:40.000000000 +0200
+++ /mounts/work_src_done/STABLE/libzypp-bindings/libzypp-bindings.changes      2007-08-23 17:19:54.609228000 +0200
@@ -1,0 +2,15 @@
+Thu Aug 23 17:10:56 CEST 2007 - aschnell@xxxxxxx
+
+- added to_a functions
+
+-------------------------------------------------------------------
+Thu Aug 23 12:49:01 CEST 2007 - aschnell@xxxxxxx
+
+- added some comparison functions
+
+-------------------------------------------------------------------
+Wed Aug 22 12:58:05 CEST 2007 - aschnell@xxxxxxx
+
+- renamed ruby module to zypp
+
+-------------------------------------------------------------------

Old:
----
  libzypp-bindings-0.4.1.tar.bz2

New:
----
  libzypp-bindings-0.4.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzypp-bindings.spec ++++++
--- /var/tmp/diff_new_pack.lHe853/_old  2007-08-24 01:41:16.000000000 +0200
+++ /var/tmp/diff_new_pack.lHe853/_new  2007-08-24 01:41:16.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package libzypp-bindings (Version 0.4.1)
+# spec file for package libzypp-bindings (Version 0.4.2)
 #
 # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
@@ -10,8 +10,8 @@
 
 
 Name:           libzypp-bindings
-Version:        0.4.1
-Release:        2
+Version:        0.4.2
+Release:        1
 License:        GPL v2 or later
 Summary:        Bindings for libzypp
 Group:          Development/Sources
@@ -72,7 +72,7 @@
 
 %files -n ruby-zypp
 %defattr(-,root,root,-)
-%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/rzypp.so
+%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
 %package -n python-zypp
 Summary:        Python Bindings for libzypp
 Group:          Development/Languages/Python
@@ -96,6 +96,12 @@
 %{_libdir}/python2.5/site-packages/zypp.py
 
 %changelog
+* Thu Aug 23 2007 - aschnell@xxxxxxx
+- added to_a functions
+* Thu Aug 23 2007 - aschnell@xxxxxxx
+- added some comparison functions
+* Wed Aug 22 2007 - aschnell@xxxxxxx
+- renamed ruby module to zypp
 * Fri Aug 17 2007 - aschnell@xxxxxxx
 - moved ruby files to vendor_ruby (bug #301127)
 * Mon Aug 13 2007 - aschnell@xxxxxxx

++++++ libzypp-bindings-0.4.1.tar.bz2 -> libzypp-bindings-0.4.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/exception.rb new/libzypp-bindings-0.4.2/examples/ruby/exception.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/exception.rb       2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/exception.rb       2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 tmp_cache_path = TmpDir.new()
 tmp_raw_cache_path = TmpDir.new()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/list_target_resolvables.rb new/libzypp-bindings-0.4.2/examples/ruby/list_target_resolvables.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/list_target_resolvables.rb 2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/list_target_resolvables.rb 2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 z = ZYppFactory::instance.get_zypp
 # puts z.class
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/mediasetaccess_example.rb new/libzypp-bindings-0.4.2/examples/ruby/mediasetaccess_example.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/mediasetaccess_example.rb  2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/mediasetaccess_example.rb  2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 a = MediaSetAccess.new("http://dist.suse.de/install/stable-x86", "/";)
 p = a.provide_file("/content", 1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/parse1.rb new/libzypp-bindings-0.4.2/examples/ruby/parse1.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/parse1.rb  2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/parse1.rb  2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 tmp_cache_path = TmpDir.new()
 tmp_raw_cache_path = TmpDir.new()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/parse2.rb new/libzypp-bindings-0.4.2/examples/ruby/parse2.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/parse2.rb  2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/parse2.rb  2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 tmp_cache_path = TmpDir.new()
 tmp_raw_cache_path = TmpDir.new()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/play_with_pool_and_target.rb new/libzypp-bindings-0.4.2/examples/ruby/play_with_pool_and_target.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/play_with_pool_and_target.rb       2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/play_with_pool_and_target.rb       2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 z = ZYppFactory::instance.get_zypp
 
@@ -18,4 +18,3 @@
   exit
 end
 
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/play_with_repos.rb new/libzypp-bindings-0.4.2/examples/ruby/play_with_repos.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/play_with_repos.rb 2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/play_with_repos.rb 2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 a = Arch.new("i386")
 puts a.to_s
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/test2.rb new/libzypp-bindings-0.4.2/examples/ruby/test2.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/test2.rb   2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/test2.rb   2007-08-23 17:11:54.000000000 +0200
@@ -1,8 +1,7 @@
 
-require 'rzypp'
+require 'zypp'
 require 'pathname'
-
-include Rzypp
+include Zypp
 
 z = ZYppFactory::instance.get_zypp
 
@@ -16,4 +15,3 @@
 puts t.class
 #puts t.methods
 
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/examples/ruby/test.rb new/libzypp-bindings-0.4.2/examples/ruby/test.rb
--- old/libzypp-bindings-0.4.1/examples/ruby/test.rb    2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/examples/ruby/test.rb    2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,6 @@
 
-require 'rzypp'
-include Rzypp
+require 'zypp'
+include Zypp
 
 a = Arch.new("i386")
 puts a.inspect
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/libzypp-bindings.spec.cmake new/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake
--- old/libzypp-bindings-0.4.1/libzypp-bindings.spec.cmake      2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/libzypp-bindings.spec.cmake      2007-08-23 17:11:54.000000000 +0200
@@ -53,7 +53,7 @@
 
 %files -n ruby-zypp
 %defattr(-,root,root,-)
-%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/rzypp.so
+%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/zypp.so
 
 %package -n python-zypp
 Summary:        Python bindings for libzypp
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/Capability.i new/libzypp-bindings-0.4.2/swig/Capability.i
--- old/libzypp-bindings-0.4.1/swig/Capability.i        2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Capability.i        2007-08-23 17:11:54.000000000 +0200
@@ -1,6 +1,7 @@
 
 #ifdef SWIGRUBY
 %alias Capability::asString "to_s";
+%alias Capability::cmp "<=>";
 #endif
 
 class Capability
@@ -80,3 +81,20 @@
     { return lhs._pimpl.get() < rhs._pimpl.get(); }
 };
 
+
+#ifdef SWIGRUBY
+
+%extend Capability
+{
+    int cmp(const Capability& other)
+    {
+       // TODO: use CapOrder::operator()?
+       if(self->asString() < other.asString())
+           return -1;
+       if(self->asString() > other.asString())
+           return +1;
+       return 0;
+    }
+}
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/Kind.i new/libzypp-bindings-0.4.2/swig/Kind.i
--- old/libzypp-bindings-0.4.1/swig/Kind.i      2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Kind.i      2007-08-23 17:11:54.000000000 +0200
@@ -45,8 +45,9 @@
     }
 }
 
-// FIXME: this is just a workaround since the whole code above does not work
-%extend Resolvable {
+%extend Resolvable
+{
+    // FIXME: this is just a workaround since the whole code above does not work
     const char* kindToS()
     {
        if (isKind<Package>(self))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/ResObject.i new/libzypp-bindings-0.4.2/swig/ResObject.i
--- old/libzypp-bindings-0.4.1/swig/ResObject.i 2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ResObject.i 2007-08-23 17:11:54.000000000 +0200
@@ -1,4 +1,8 @@
 
+#ifdef SWIGRUBY
+%alias intrusive_ptr<const ResObject>::cmp "<=>";
+#endif
+
 %template(ResObject_constPtr) intrusive_ptr<const ResObject>;
 
 class ResObject : public Resolvable
@@ -30,8 +34,10 @@
     virtual ~ResObject();
 };
 
-// FIXME: this is just a workaround, see Kind.i
-%extend intrusive_ptr<const ResObject> {
+
+%extend intrusive_ptr<const ResObject>
+{
+    // FIXME: this is just a workaround, see Kind.i
     const char* kindToS()
     {
        if (isKind<Package>(*self))
@@ -46,5 +52,10 @@
            return "language";
        return "unknown";
     }
+
+    int cmp(intrusive_ptr<const ResObject>& other)
+    {
+       return compareByNVRA(*self, other);
+    }
 }
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/Resolvable.i new/libzypp-bindings-0.4.2/swig/Resolvable.i
--- old/libzypp-bindings-0.4.1/swig/Resolvable.i        2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/Resolvable.i        2007-08-23 17:11:54.000000000 +0200
@@ -23,3 +23,12 @@
     virtual std::ostream & dumpOn( std::ostream & str ) const;
 };
 
+int compareByN(const Resolvable::constPtr & lhs,
+              const Resolvable::constPtr & rhs);
+
+int compareByNVR(const Resolvable::constPtr & lhs,
+                const Resolvable::constPtr & rhs);
+
+int compareByNVRA(const Resolvable::constPtr& lhs,
+                 const Resolvable::constPtr& rhs);
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/ruby/CMakeLists.txt new/libzypp-bindings-0.4.2/swig/ruby/CMakeLists.txt
--- old/libzypp-bindings-0.4.1/swig/ruby/CMakeLists.txt 2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ruby/CMakeLists.txt 2007-08-23 17:11:54.000000000 +0200
@@ -2,9 +2,8 @@
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
 
 FIND_PACKAGE(Ruby REQUIRED)
-EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['vendorarchdir']"
+EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorarchdir']"
    OUTPUT_VARIABLE RUBY_VENDOR_ARCH_DIR)
-STRING(REPLACE "\n" "" RUBY_VENDOR_ARCH_DIR "${RUBY_VENDOR_ARCH_DIR}")
 MESSAGE( STATUS "Ruby vendor arch dir: ${RUBY_VENDOR_ARCH_DIR}" )
 MESSAGE( STATUS "Ruby include path: ${RUBY_INCLUDE_PATH}" )
 
@@ -24,14 +23,14 @@
    DEPENDS ${SWIG_OUTPUT}
 )
 
-ADD_LIBRARY( rzypp SHARED "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
-SET_TARGET_PROPERTIES( rzypp PROPERTIES PREFIX "" )
-ADD_DEPENDENCIES( rzypp glue )
+ADD_LIBRARY( zypp SHARED "${CMAKE_CURRENT_BINARY_DIR}/zypp_wrap.cxx" )
+SET_TARGET_PROPERTIES( zypp PROPERTIES PREFIX "" )
+ADD_DEPENDENCIES( zypp glue )
 
 INCLUDE_DIRECTORIES( ${RUBY_INCLUDE_PATH} )
 INCLUDE_DIRECTORIES( ${ZYPP_INCLUDE_DIR} )
-TARGET_LINK_LIBRARIES( rzypp ${ZYPP_LIBRARY} )
-TARGET_LINK_LIBRARIES( rzypp ${RUBY_LIBRARY} )
+TARGET_LINK_LIBRARIES( zypp ${ZYPP_LIBRARY} )
+TARGET_LINK_LIBRARIES( zypp ${RUBY_LIBRARY} )
 
-INSTALL(TARGETS rzypp LIBRARY DESTINATION ${RUBY_VENDOR_ARCH_DIR} )
+INSTALL(TARGETS zypp LIBRARY DESTINATION ${RUBY_VENDOR_ARCH_DIR})
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/ruby/ruby.i new/libzypp-bindings-0.4.2/swig/ruby/ruby.i
--- old/libzypp-bindings-0.4.1/swig/ruby/ruby.i 2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/ruby/ruby.i 2007-08-23 17:11:54.000000000 +0200
@@ -1,19 +1,31 @@
 
 
 /*
- *  Extend cls with an ruby-like each iterator.  Yields objects of type storetype.
- *  Parameter storetype must be a pointer type.
+ *  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.
  */
 #define iter2(cls, storetype) \
 %mixin cls "Enumerable"; \
-%extend cls { \
+%extend cls \
+{ \
     void each() { \
        cls::const_iterator i = self->begin(); \
         while (i != self->end()) { \
            const storetype tmp = &**i; \
            rb_yield(SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
-            ++i; \
+            i++; \
+        } \
+    } \
+\
+    VALUE to_a() { \
+        VALUE ary = rb_ary_new(); \
+       cls::const_iterator i = self->begin(); \
+        while (i != self->end()) { \
+           const storetype tmp = &**i; \
+            rb_ary_push(ary, SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
+            i++; \
         } \
+        return ary; \
     } \
 }
 
@@ -22,14 +34,26 @@
  */
 #define iter3(cls, storetype) \
 %mixin cls "Enumerable"; \
-%extend cls { \
+%extend cls \
+{ \
     void each() { \
        cls::const_iterator i = self->begin(); \
         while (i != self->end()) { \
            const storetype tmp = &*i; \
            rb_yield(SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
-            ++i; \
+            i++; \
+        } \
+    } \
+\
+    VALUE to_a() { \
+        VALUE ary = rb_ary_new(); \
+       cls::const_iterator i = self->begin(); \
+        while (i != self->end()) { \
+           const storetype tmp = &*i; \
+            rb_ary_push(ary, SWIG_NewPointerObj((void*) tmp, $descriptor(storetype), 0)); \
+            i++; \
         } \
+        return ary; \
     } \
 }
 
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/swig/zypp.i new/libzypp-bindings-0.4.2/swig/zypp.i
--- old/libzypp-bindings-0.4.1/swig/zypp.i      2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/swig/zypp.i      2007-08-23 17:11:54.000000000 +0200
@@ -1,8 +1,4 @@
-#ifdef SWIGRUBY
-%module rzypp
-#else
 %module zypp
-#endif
 
 %{
 /* Includes the header in the wrapper code */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libzypp-bindings-0.4.1/VERSION.cmake new/libzypp-bindings-0.4.2/VERSION.cmake
--- old/libzypp-bindings-0.4.1/VERSION.cmake    2007-08-17 14:51:33.000000000 +0200
+++ new/libzypp-bindings-0.4.2/VERSION.cmake    2007-08-23 17:11:54.000000000 +0200
@@ -1,3 +1,3 @@
 SET(VERSION_MAJOR "0")
 SET(VERSION_MINOR "4")
-SET(VERSION_PATCH "1")
+SET(VERSION_PATCH "2")


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >