commit: 1e2412c2e4b566936653e98e62d244efd5523848
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 25 06:39:55 2017 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Apr 25 06:40:16 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e2412c2
dev-python/catkin_pkg: Add patch by Tim Rakowski in bug #612860 to avoid
infinite loop in crawling directories
Package-Manager: Portage-2.3.5, Repoman-2.3.2
...-0.3.1-r2.ebuild => catkin_pkg-0.3.1-r3.ebuild} | 7 +++++-
dev-python/catkin_pkg/catkin_pkg-9999.ebuild | 7 +++++-
dev-python/catkin_pkg/files/infinite_loop.patch | 27 ++++++++++++++++++++++
3 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/dev-python/catkin_pkg/catkin_pkg-0.3.1-r2.ebuild
b/dev-python/catkin_pkg/catkin_pkg-0.3.1-r3.ebuild
similarity index 86%
rename from dev-python/catkin_pkg/catkin_pkg-0.3.1-r2.ebuild
rename to dev-python/catkin_pkg/catkin_pkg-0.3.1-r3.ebuild
index f86e76ef427..28e56139aea 100644
--- a/dev-python/catkin_pkg/catkin_pkg-0.3.1-r2.ebuild
+++ b/dev-python/catkin_pkg/catkin_pkg-0.3.1-r3.ebuild
@@ -34,7 +34,12 @@ RDEPEND="
DEPEND="${RDEPEND}
test? ( dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}] )
"
-PATCHES=( "${FILESDIR}/catkin_prefix.patch" "${FILESDIR}/argparse.patch"
"${FILESDIR}/ros_packages.patch" )
+PATCHES=(
+ "${FILESDIR}/catkin_prefix.patch"
+ "${FILESDIR}/argparse.patch"
+ "${FILESDIR}/ros_packages.patch"
+ "${FILESDIR}/infinite_loop.patch"
+)
python_test() {
nosetests -s --tests test || die
diff --git a/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
b/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
index f86e76ef427..28e56139aea 100644
--- a/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
+++ b/dev-python/catkin_pkg/catkin_pkg-9999.ebuild
@@ -34,7 +34,12 @@ RDEPEND="
DEPEND="${RDEPEND}
test? ( dev-python/mock[${PYTHON_USEDEP}]
dev-python/nose[${PYTHON_USEDEP}] )
"
-PATCHES=( "${FILESDIR}/catkin_prefix.patch" "${FILESDIR}/argparse.patch"
"${FILESDIR}/ros_packages.patch" )
+PATCHES=(
+ "${FILESDIR}/catkin_prefix.patch"
+ "${FILESDIR}/argparse.patch"
+ "${FILESDIR}/ros_packages.patch"
+ "${FILESDIR}/infinite_loop.patch"
+)
python_test() {
nosetests -s --tests test || die
diff --git a/dev-python/catkin_pkg/files/infinite_loop.patch
b/dev-python/catkin_pkg/files/infinite_loop.patch
new file mode 100644
index 00000000000..7aa3084efa0
--- /dev/null
+++ b/dev-python/catkin_pkg/files/infinite_loop.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/show_bug.cgi?id=612860
+By Tim Rakowski
+We os.walk /usr with followlinks=True, but at least nodejs contains a
"recursive" link in /usr/include/node
+
+Index: catkin_pkg-0.3.1/src/catkin_pkg/packages.py
+===================================================================
+--- catkin_pkg-0.3.1.orig/src/catkin_pkg/packages.py
++++ catkin_pkg-0.3.1/src/catkin_pkg/packages.py
+@@ -52,7 +52,9 @@ def find_package_paths(basepath, exclude_paths=None,
exclude_subspaces=False):
+ """
+ paths = []
+ real_exclude_paths = [os.path.realpath(p) for p in exclude_paths] if
exclude_paths is not None else []
++ visited = set()
+ for dirpath, dirnames, filenames in os.walk(basepath, followlinks=True):
++ visited.add(dirpath)
+ if 'CATKIN_IGNORE' in filenames or \
+ os.path.realpath(dirpath) in real_exclude_paths or \
+ (exclude_subspaces and '.catkin' in filenames):
+@@ -63,7 +65,7 @@ def find_package_paths(basepath, exclude_paths=None,
exclude_subspaces=False):
+ del dirnames[:]
+ continue
+ for dirname in dirnames:
+- if dirname.startswith('.'):
++ if dirname.startswith('.') or
os.path.realpath(os.path.join(dirpath, dirname)) in visited:
+ dirnames.remove(dirname)
+ return paths
+