[ros-rospack] 01/01: Make rosdep optional

Jochen Sprickerhof jspricke-guest at moszumanska.debian.org
Mon Nov 9 10:41:43 UTC 2015


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

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

commit 6ffdfa3a0cbdf29ad2010f2625e6019e07296adb
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Mon Nov 9 11:41:05 2015 +0100

    Make rosdep optional
---
 debian/control                                     |  3 +-
 .../0003-Make-rospack-usable-without-rosdep.patch  | 44 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index bc930dc..ecec302 100644
--- a/debian/control
+++ b/debian/control
@@ -42,7 +42,8 @@ Description: Robot OS package information library
 Package: rospack-tools
 Section: utils
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, python-rosdep
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: python-rosdep
 Description: command-line tool for retrieving information about Robot OS packages
  This package is part of Robot OS (ROS).  rospack is a command-line
  tool for retrieving information about ROS packages available on the
diff --git a/debian/patches/0003-Make-rospack-usable-without-rosdep.patch b/debian/patches/0003-Make-rospack-usable-without-rosdep.patch
new file mode 100644
index 0000000..239c7a7
--- /dev/null
+++ b/debian/patches/0003-Make-rospack-usable-without-rosdep.patch
@@ -0,0 +1,44 @@
+From: Jochen Sprickerhof <git at jochen.sprickerhof.de>
+Date: Mon, 9 Nov 2015 11:19:09 +0100
+Subject: Make rospack usable without rosdep
+
+---
+ src/rospack.cpp | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/src/rospack.cpp b/src/rospack.cpp
+index 1502a9e..124847a 100644
+--- a/src/rospack.cpp
++++ b/src/rospack.cpp
+@@ -1692,7 +1692,14 @@ Rosstackage::isSysPackage(const std::string& pkgname)
+       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::cout << "could not find python module 'rosdep2.rospack', continuing without it" << std::endl;
++        rosdep_warning = true;
++      }
++      cache[pkgname] = true;
++      return true;
+     }
+     pDict = PyModule_GetDict(pModule);
+   }
+@@ -1738,7 +1745,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::cout << "could not find rosdep cache, continuing without it" << std::endl;
++        rosdep_cache_warning = true;
++      }
++      cache[pkgname] = true;
++      return true;
+     }
+     rospack_view_not_empty = true;
+   }
diff --git a/debian/patches/series b/debian/patches/series
index 898d8d6..0552fe3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Add-Debian-specific-SOVERSION.patch
 0002-Add-usr-share-as-default-ROS_PACKAGE_PATH.patch
+0003-Make-rospack-usable-without-rosdep.patch

-- 
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