Patch zypp::RepoManager 72/131272/1 submit/tizen/20170526.055906
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 26 May 2017 05:45:13 +0000 (14:45 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 26 May 2017 05:47:50 +0000 (14:47 +0900)
    zypp::RepoManager loadSolvFile() is used at mic

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] mic image create error

VERBOSE: Failed to load plugin backend/zypppkgmgr: python-zypp in host
system cannot support PoolQuery or loadSolvFile interface, please update
it to enhanced version which can be found in download.tizen.org/tools

[Cause & Measure] Add patch
[Checking Method] N/A

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: I3c8fe708f726abc747b4bc01cc22b6be5a27ab21
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
swig/RepoManager.i

index 8f7870d..899ed6f 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
+