[ros-rospack] 01/01: Add patch to limit search depth

Jochen Sprickerhof jspricke-guest at moszumanska.debian.org
Mon Feb 15 09:36:28 UTC 2016


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 ad6c43e4735b52c0fbbe740d48fc9282dc7850bd
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date:   Mon Feb 15 10:36:05 2016 +0100

    Add patch to limit search depth
---
 .../0004-Limit-search-depth-for-usr-share.patch    | 29 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 30 insertions(+)

diff --git a/debian/patches/0004-Limit-search-depth-for-usr-share.patch b/debian/patches/0004-Limit-search-depth-for-usr-share.patch
new file mode 100644
index 0000000..70da62f
--- /dev/null
+++ b/debian/patches/0004-Limit-search-depth-for-usr-share.patch
@@ -0,0 +1,29 @@
+From: Jochen Sprickerhof <git at jochen.sprickerhof.de>
+Date: Mon, 15 Feb 2016 10:33:19 +0100
+Subject: Limit search depth for /usr/share
+
+---
+ src/rospack.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/rospack.cpp b/src/rospack.cpp
+index d4c8fc2..ab3f72a 100644
+--- a/src/rospack.cpp
++++ b/src/rospack.cpp
+@@ -30,6 +30,7 @@
+ #include "tinyxml.h"
+ 
+ #include <boost/algorithm/string.hpp>
++#include <boost/algorithm/string/predicate.hpp>
+ #include <boost/filesystem.hpp>
+ #include <boost/functional/hash.hpp>
+ #include <stdexcept>
+@@ -1520,7 +1521,7 @@ Rosstackage::crawlDetail(const std::string& path,
+         std::string name = dit->path().filename().string();
+ #endif
+         // Ignore directories starting with '.'
+-        if(name.size() == 0 || name[0] == '.')
++        if(name.size() == 0 || name[0] == '.' || (boost::starts_with(dit->path().string(), "/usr/share") && depth > 1))
+           continue;
+ 
+         crawlDetail(dit->path().string(), force, depth+1,
diff --git a/debian/patches/series b/debian/patches/series
index 0552fe3..f794283 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Add-Debian-specific-SOVERSION.patch
 0002-Add-usr-share-as-default-ROS_PACKAGE_PATH.patch
 0003-Make-rospack-usable-without-rosdep.patch
+0004-Limit-search-depth-for-usr-share.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