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

Jochen Sprickerhof jspricke-guest at moszumanska.debian.org
Tue Jul 26 16:31:20 UTC 2016


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

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

commit 358ea83dd167c4a3887d163e511fee5b63bfa1a3
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 b213566..25ad345 100644
--- a/src/rospack.cpp
+++ b/src/rospack.cpp
@@ -1686,10 +1686,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);
   }
@@ -1735,7 +1741,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