Fix swig syntax error 71/251471/1 sandbox/dh0128.kwak/libzypp_17.23.7_20201130 submit/tizen/20210114.060819
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 14 Jan 2021 05:56:21 +0000 (14:56 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 14 Jan 2021 05:56:21 +0000 (14:56 +0900)
[  116s] /home/abuild/rpmbuild/BUILD/libzypp-bindings-0.7.4/build/swig/python/libzypp_python.cc:149336:36: error: no matching function for call to 'zypp::ResPool::EstablishedStates::EstablishedStates()'
[  116s] 149336 |   zypp::ResPool::EstablishedStates result;

Change-Id: Id1ac6f91630384f4b5c3d9201a1fae90b9278b60

packaging/fix_swig_syntax_error.patch

index 8ef9e0c..d0e79e6 100644 (file)
@@ -38,3 +38,17 @@ index 33de43c82..1ba453a8a 100644
        /** Severity string mapped to an enum.
         * Unknown string values are mapped to \ref SEV_OTHER
         */
+diff --git a/zypp/ResPool.h b/zypp/ResPool.h
+index 88b1844f6..b3adf33a9 100644
+--- a/zypp/ResPool.h
++++ b/zypp/ResPool.h
+@@ -335,7 +335,9 @@ namespace zypp
+        * content changes. User code usually want's to call \ref changedPseudoInstalled
+        * directly.
+        */
++#ifndef SWIG // Swig treats it as syntax error
+       EstablishedStates establishedStates() const;
++#endif
+       /** Map holding pseudo installed items where current and established status differ. */
+       typedef EstablishedStates::ChangedPseudoInstalled ChangedPseudoInstalled;