[ros-rospack] 04/08: Make rospack usable without rosdep

Jochen Sprickerhof jspricke at moszumanska.debian.org
Wed Jul 12 16:58:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

jspricke pushed a commit to branch patch-queue/master
in repository ros-rospack.

commit 1d71d711df4a39479bc39e1005cc9fd3663bc503
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Mon Nov 9 11:19:09 2015 +0100

    Make rospack usable without rosdep
    
    
    Gbp-Pq: Name 0003-Make-rospack-usable-without-rosdep.patch
---
 src/rospack.cpp | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/rospack.cpp b/src/rospack.cpp
index 3b2ea3d..ce0420b 100644
--- a/src/rospack.cpp
+++ b/src/rospack.cpp
@@ -1696,10 +1696,16 @@ Rosstackage::isSysPackage(const std::string& pkgname)
     Py_DECREF(pName);
     if(!pModule)
     {
-      PyErr_Print();
       PyGILState_Release(gstate);
       std::string errmsg = "could not find python module 'rosdep2.rospack'. is rosdep up-to-date (at least 0.10.4)?";
-      throw Exception(errmsg);
+
+      static bool rosdep_warning = false;
+      if(!rosdep_warning) {
+        std::cerr << "could not find python module 'rosdep2.rospack', continuing without it" << std::endl;
+        rosdep_warning = true;
+      }
+      cache[pkgname] = true;
+      return true;
     }
     pDict = PyModule_GetDict(pModule);
   }
@@ -1745,7 +1751,14 @@ Rosstackage::isSysPackage(const std::string& pkgname)
       PyErr_Print();
       PyGILState_Release(gstate);
       std::string errmsg = "the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'";
-      throw Exception(errmsg);
+
+      static bool rosdep_cache_warning = false;
+      if(!rosdep_cache_warning) {
+        std::cerr << "could not find rosdep cache, continuing without it" << std::endl;
+        rosdep_cache_warning = true;
+      }
+      cache[pkgname] = true;
+      return true;
     }
     rospack_view_not_empty = true;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-rospack.git



More information about the debian-science-commits mailing list