Rebase for zypper 0.6.1 93/132593/1
authorAnas Nashif <anas.nashif@intel.com>
Mon, 27 May 2013 19:37:23 +0000 (15:37 -0400)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 7 Jun 2017 05:08:40 +0000 (14:08 +0900)
Change-Id: If108be3cee11d3b4d6354e1b59a369423d34cbed
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp-bindings.changes
packaging/libzypp-bindings.changes [new file with mode: 0644]
packaging/libzypp-bindings.manifest [new file with mode: 0644]
packaging/libzypp-bindings.spec [new file with mode: 0644]
swig/CMakeLists.txt
swig/PoolQuery.i [new file with mode: 0644]
swig/RepoManager.i
swig/RepoType.i
swig/SolvAttr.i [new file with mode: 0644]
swig/zypp.i

index 541e39f..b0f8cf7 100644 (file)
@@ -1,4 +1,4 @@
 # on maintenance branch add a 2nd level to patch (p.1, p.2, ...)
 SET(VERSION_MAJOR "0")
 SET(VERSION_MINOR "6")
-SET(VERSION_PATCH "1")
+SET(VERSION_PATCH "2")
index ca760d9..7f19f52 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Aug 14 14:45:12 CEST 2014 - mls@suse.de
+
+- work around syntax errors because of __attribute__ 
+- 0.6.2
+
+-------------------------------------------------------------------
 Fri Mar 14 14:39:37 CET 2014 - ma@suse.de
 
 - c++11 fixes
diff --git a/packaging/libzypp-bindings.changes b/packaging/libzypp-bindings.changes
new file mode 100644 (file)
index 0000000..c376a2f
--- /dev/null
@@ -0,0 +1,39 @@
+* Mon Aug 11 2014 Chanho Park <chanho61.park@samsung.com> upstream/0.6.1
+- Update to 0.6.1
+
+* Thu Jun 28 2013 Gui Chen <gui.chen@intel.com>
+- add SolvAttr class
+
+* Thu Jun 27 2013 Gui Chen <gui.chen@intel.com>  18a5e07
+- add more interface for tizen
+
+* Mon May 27 2013 Anas Nashif <anas.nashif@intel.com> 2fba846
+- Update to 0.5.14
+
+* Tue Dec 20 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9.1
+- depend special version of libzypp for opensuse 11.4 and 11.3
+
+* Mon Oct 24 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9
+- Add loadSolvFile API to load solv file
+
+* Sun Sep 18 2011 Zhang Qiang <qiang.z.zhang@intel.com> - 0.5.9
+- Add CapNames to return provides info
+- Add a patch to provide PoolQuery interface.
+
+* Fri Sep 02 2011 Gui Chen <gui.chen@intel.com> - 0.5.9
+- Update to 0.5.9
+
+* Mon Aug 01 2011 Gui Chen <gui.chen@intel.com> - 0.5.8
+- Added armv7tnhl and armv7thl support
+
+* Fri Jan 21 2011 Marko Saukko <marko.saukko@cybercom.com> - 0.5.8
+- Added armv7hl and armv7nhl architectures (BMC#12713)
+
+* Tue Jan 04 2011 Yi Yang <yi.y.yang@intel.com> - 0.5.8
+- Support builtin arm architectures
+
+* Fri Dec 17 2010 Yi Yang <yi.y.yang@intel.com> - 0.5.8
+- Update to 0.5.8
+
+* Thu Nov 25 2010 Yi Yang <yi.y.yang@intel.com> - 0.5.7
+- Update to 0.5.7
diff --git a/packaging/libzypp-bindings.manifest b/packaging/libzypp-bindings.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/libzypp-bindings.spec b/packaging/libzypp-bindings.spec
new file mode 100644 (file)
index 0000000..305b869
--- /dev/null
@@ -0,0 +1,64 @@
+# 
+# spec file for package libzypp-bindings
+#
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# 
+Name:           libzypp-bindings
+Version:        0.6.1
+Release:        0
+License:        GPL-2.0+
+Summary:        Bindings for libzypp
+Group:          Development/Sources
+Source:         %{name}-%{version}.tar.gz
+Source1001:    libzypp-bindings.manifest
+
+BuildRequires:  cmake gcc-c++ python-devel
+BuildRequires:  swig
+
+BuildRequires:  libzypp-devel
+
+%description
+This package provides bindings for libzypp, the library for package management.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+mkdir build
+cd build
+%cmake -DCMAKE_INSTALL_PREFIX=%{prefix} \
+      -DPYTHON_SITEDIR=%{python_sitearch} \
+      -DLIB=%{_lib} \
+      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
+      -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
+      -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DCMAKE_SKIP_RPATH=1 \
+      ..
+make -j1
+
+%install
+cd build
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+
+%package -n python-zypp
+Summary:        Python bindings for libzypp
+Group:          Development/Languages/Python
+Requires:  libzypp
+
+%description -n python-zypp
+Python bindings of libzypp
+
+
+%files -n python-zypp
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{python_sitearch}/_zypp.so
+%{python_sitearch}/zypp.py*
index efa48c4..ea807f6 100644 (file)
@@ -24,6 +24,6 @@ IF (PYTHON_LIBRARY)
   ADD_SUBDIRECTORY(python)
 ENDIF(PYTHON_LIBRARY)
       
-IF (PERL_EXECUTABLE)
-  ADD_SUBDIRECTORY(perl5)
-ENDIF (PERL_EXECUTABLE)
+#IF (PERL_EXECUTABLE)
+#  ADD_SUBDIRECTORY(perl5)
+#ENDIF (PERL_EXECUTABLE)
diff --git a/swig/PoolQuery.i b/swig/PoolQuery.i
new file mode 100644 (file)
index 0000000..05ff584
--- /dev/null
@@ -0,0 +1,39 @@
+%ignore zypp::PoolQuery::operator<<;
+%ignore zypp::detail::operator<<;
+%ignore zypp::dumpOn;
+%ignore zypp::detail::dumpOn;
+%ignore operator<<;
+%include <zypp/PoolQuery.h>
+%include "std_vector.i"
+namespace std {
+       %template(PoolItemVector) vector<zypp::PoolItem>;
+}
+namespace zypp
+{
+    namespace detail
+    {
+        %ignore operator<<;
+    }
+}
+%{
+#include <vector>
+using std::vector;
+%}
+
+#ifdef SWIGPYTHON
+%extend  zypp::PoolQuery {
+std::vector<zypp::PoolItem>  queryResults (zypp::ResPool pool)
+{
+#define for_(IT,BEG,END) for ( decltype(BEG) IT = BEG; IT != END; ++IT )
+    std::vector<zypp::PoolItem> items;
+    for_(it, self->begin(), self->end())
+    {
+        PoolItem pi(*it);
+        items.push_back(pi);
+    }
+
+    return items;
+}
+}
+#endif
+
index 8f7870d..a150d32 100644 (file)
@@ -1 +1,19 @@
 %include <zypp/RepoManager.h>
+
+#ifdef SWIGPYTHON
+%extend  zypp::RepoManager{
+    std::string loadSolvFile(std::string _solv, std::string _alias)
+    {
+        RepoInfo tmpRepo; 
+        tmpRepo.setAlias(_alias);
+        try {
+            sat::Pool::instance().addRepoSolv(_solv, tmpRepo);
+        } catch ( const Exception & e ){
+            return e.msg();
+        }
+
+        return std::string();
+    }
+}
+#endif
+
index d9f1164..3907371 100644 (file)
@@ -1 +1,2 @@
-%include <zypp/repo/RepoType.h>
\ No newline at end of file
+%ignore zypp::operator<<;
+%include <zypp/repo/RepoType.h>
diff --git a/swig/SolvAttr.i b/swig/SolvAttr.i
new file mode 100644 (file)
index 0000000..5c77ba8
--- /dev/null
@@ -0,0 +1,2 @@
+%ignore zypp::sat::SolvAttr::repositoryRevision;
+%include <zypp/sat/SolvAttr.h>
index 53b781d..9935197 100644 (file)
@@ -139,6 +139,8 @@ SWIGINTERNINLINE SV *SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value);
 #include "zypp/Resolver.h"
 #include "legacy/GetResolvablesToInsDel.h"
 
+#include "zypp/sat/SolvAttr.h"
+#include "zypp/PoolQuery.h"
 #include "zypp/Product.h"
 
 using namespace boost;
@@ -151,6 +153,9 @@ typedef std::list<std::string> StringList;
 
 %}
 
+/* swig does not understand the __attribute__ extension */
+#define  __attribute__(x)
+
 /* prevent swig from creating a type called 'Target_Type' */
 #if defined(SWIGRUBY)
 #define Target_Type VALUE
@@ -233,6 +238,7 @@ namespace zypp {
 %include "OnMediaLocation.i"
 %include "Resolvable.i"
 %include "RepoType.i"
+%include "TmpPath.i"
 %include "RepoInfo.i"
 %include "Repository.i"
 %include "ServiceInfo.i"
@@ -256,9 +262,10 @@ namespace zypp {
 %include "ResPool.i"
 %include "ZYppCommitPolicy.i"
 %include "ZYppCommitResult.i"
-%include "TmpPath.i"
 %include "Resolver.i"
 %include "ZConfig.i"
+%include "PoolQuery.i"
+%include "SolvAttr.i"
 
 //just simple files, where we need default ctor
 %include <zypp/repo/RepoProvideFile.h>