summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-05-27 15:37:23 -0400
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-06-07 14:08:40 +0900
commit26b776bcb72336bfe575bf01e99415a345e61f0a (patch)
treeca9147cf8a8acda8647e0729cb6d74f154fb0937
parentbcae983fb18673dca91f98ae37c1b5d3c5fe8126 (diff)
downloadlibzypp-bindings-26b776bcb72336bfe575bf01e99415a345e61f0a.tar.gz
libzypp-bindings-26b776bcb72336bfe575bf01e99415a345e61f0a.tar.bz2
libzypp-bindings-26b776bcb72336bfe575bf01e99415a345e61f0a.zip
Rebase for zypper 0.6.1
Change-Id: If108be3cee11d3b4d6354e1b59a369423d34cbed Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--VERSION.cmake2
-rw-r--r--package/libzypp-bindings.changes6
-rw-r--r--packaging/libzypp-bindings.changes39
-rw-r--r--packaging/libzypp-bindings.manifest5
-rw-r--r--packaging/libzypp-bindings.spec64
-rw-r--r--swig/CMakeLists.txt6
-rw-r--r--swig/PoolQuery.i39
-rw-r--r--swig/RepoManager.i18
-rw-r--r--swig/RepoType.i3
-rw-r--r--swig/SolvAttr.i2
-rw-r--r--swig/zypp.i9
11 files changed, 187 insertions, 6 deletions
diff --git a/VERSION.cmake b/VERSION.cmake
index 541e39f..b0f8cf7 100644
--- a/VERSION.cmake
+++ b/VERSION.cmake
@@ -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")
diff --git a/package/libzypp-bindings.changes b/package/libzypp-bindings.changes
index ca760d9..7f19f52 100644
--- a/package/libzypp-bindings.changes
+++ b/package/libzypp-bindings.changes
@@ -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
index 0000000..c376a2f
--- /dev/null
+++ b/packaging/libzypp-bindings.changes
@@ -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
index 0000000..017d22d
--- /dev/null
+++ b/packaging/libzypp-bindings.manifest
@@ -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
index 0000000..305b869
--- /dev/null
+++ b/packaging/libzypp-bindings.spec
@@ -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*
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index efa48c4..ea807f6 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -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
index 0000000..05ff584
--- /dev/null
+++ b/swig/PoolQuery.i
@@ -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
+
diff --git a/swig/RepoManager.i b/swig/RepoManager.i
index 8f7870d..a150d32 100644
--- a/swig/RepoManager.i
+++ b/swig/RepoManager.i
@@ -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
+
diff --git a/swig/RepoType.i b/swig/RepoType.i
index d9f1164..3907371 100644
--- a/swig/RepoType.i
+++ b/swig/RepoType.i
@@ -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
index 0000000..5c77ba8
--- /dev/null
+++ b/swig/SolvAttr.i
@@ -0,0 +1,2 @@
+%ignore zypp::sat::SolvAttr::repositoryRevision;
+%include <zypp/sat/SolvAttr.h>
diff --git a/swig/zypp.i b/swig/zypp.i
index 53b781d..9935197 100644
--- a/swig/zypp.i
+++ b/swig/zypp.i
@@ -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>