1 |
commit: 01d5d3de1190a8355e8d42e739bed44dd427a633 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 7 15:54:09 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 7 15:55:15 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01d5d3de |
7 |
|
8 |
dev-python/rospkg: drop norecurse patch now that ROS_PACKAGE_PATH is installed in /usr/share/ros_packages. |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
dev-python/rospkg/files/norecurse.patch | 64 ---------------------- |
13 |
...ospkg-1.0.41.ebuild => rospkg-1.0.41-r1.ebuild} | 11 ---- |
14 |
dev-python/rospkg/rospkg-9999.ebuild | 13 +---- |
15 |
3 files changed, 1 insertion(+), 87 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/rospkg/files/norecurse.patch b/dev-python/rospkg/files/norecurse.patch |
18 |
deleted file mode 100644 |
19 |
index 4b7aae9..00000000 |
20 |
--- a/dev-python/rospkg/files/norecurse.patch |
21 |
+++ /dev/null |
22 |
@@ -1,64 +0,0 @@ |
23 |
-commit c2e06e0ea0b4a1cbb67049ab77a80f53646fb0b2 |
24 |
-Author: Alexis Ballier <aballier@g.o> |
25 |
-Date: Tue Dec 23 12:27:19 2014 +0100 |
26 |
- |
27 |
- Add support for rospack_norecurse to avoid recursing into all subdirectories when looking for a package. |
28 |
- |
29 |
- I am installing ros into /usr, hence this searches in /usr/share. I have a lot of directories, not ROS related, into /usr/share (e.g. a full TeX Live install), and I get these timings: |
30 |
- |
31 |
- Without rospack_norecurse in /usr/share: |
32 |
- $ time rosversion rospack |
33 |
- 2.2.5 |
34 |
- |
35 |
- real 0m2.861s |
36 |
- user 0m1.588s |
37 |
- sys 0m1.267s |
38 |
- |
39 |
- With rospack_norecurse in /usr/share: |
40 |
- $ time rosversion rospack |
41 |
- 2.2.5 |
42 |
- |
43 |
- real 0m0.135s |
44 |
- user 0m0.100s |
45 |
- sys 0m0.034s |
46 |
- |
47 |
- This is on a desktop with a SSD drive. On an arm board, with much less packages in /usr/share but way much slower I/O I remember hitting the 10 seconds timeout for roscore to start. |
48 |
- |
49 |
-diff --git a/src/rospkg/rospack.py b/src/rospkg/rospack.py |
50 |
-index e55acec..7ed98de 100644 |
51 |
---- a/src/rospkg/rospack.py |
52 |
-+++ b/src/rospkg/rospack.py |
53 |
-@@ -42,7 +42,7 @@ from .stack import parse_stack_file, InvalidStack |
54 |
- _cache_lock = Lock() |
55 |
- |
56 |
- |
57 |
--def list_by_path(manifest_name, path, cache): |
58 |
-+def list_by_path(manifest_name, path, cache, recurse=True): |
59 |
- """ |
60 |
- List ROS stacks or packages within the specified path. |
61 |
- |
62 |
-@@ -53,6 +53,7 @@ def list_by_path(manifest_name, path, cache): |
63 |
- :param manifest_name: MANIFEST_FILE or STACK_FILE, ``str`` |
64 |
- :param path: path to list resources in, ``str`` |
65 |
- :param cache: path cache to update. Maps resource name to directory path, ``{str: str}`` |
66 |
-+ :param recurse: search recursively in subdirectories ``bool`` |
67 |
- :returns: complete list of resources in ROS environment, ``[str]`` |
68 |
- """ |
69 |
- resources = [] |
70 |
-@@ -89,9 +90,15 @@ def list_by_path(manifest_name, path, cache): |
71 |
- # optimization for stacks. |
72 |
- del dirs[:] |
73 |
- continue #leaf |
74 |
-- elif 'rospack_nosubdirs' in files: |
75 |
-+ elif 'rospack_nosubdirs' in files or not recurse: |
76 |
- del dirs[:] |
77 |
- continue #leaf |
78 |
-+ elif 'rospack_norecurse' in files: |
79 |
-+ for sd in dirs: |
80 |
-+ spath = os.path.join(d, sd) |
81 |
-+ resources += list_by_path(manifest_name, spath, cache, False) |
82 |
-+ del dirs[:] |
83 |
-+ continue |
84 |
- # remove hidden dirs (esp. .svn/.git) |
85 |
- [dirs.remove(di) for di in dirs if di[0] == '.'] |
86 |
- return resources |
87 |
|
88 |
diff --git a/dev-python/rospkg/rospkg-1.0.41.ebuild b/dev-python/rospkg/rospkg-1.0.41-r1.ebuild |
89 |
similarity index 82% |
90 |
rename from dev-python/rospkg/rospkg-1.0.41.ebuild |
91 |
rename to dev-python/rospkg/rospkg-1.0.41-r1.ebuild |
92 |
index 9939d92..666d51a 100644 |
93 |
--- a/dev-python/rospkg/rospkg-1.0.41.ebuild |
94 |
+++ b/dev-python/rospkg/rospkg-1.0.41-r1.ebuild |
95 |
@@ -39,18 +39,7 @@ DEPEND="${RDEPEND} |
96 |
dev-python/coverage[${PYTHON_USEDEP}] |
97 |
) |
98 |
" |
99 |
-PATCHES=( |
100 |
- "${FILESDIR}/norecurse.patch" |
101 |
-) |
102 |
|
103 |
python_test() { |
104 |
nosetests --with-coverage --cover-package=rospkg --with-xunit test || die |
105 |
} |
106 |
- |
107 |
-src_install() { |
108 |
- distutils-r1_src_install |
109 |
- |
110 |
- # Avoid recursing into /usr/share when looking for packages. |
111 |
- dodir /usr/share |
112 |
- touch "${ED}/usr/share/rospack_norecurse" |
113 |
-} |
114 |
|
115 |
diff --git a/dev-python/rospkg/rospkg-9999.ebuild b/dev-python/rospkg/rospkg-9999.ebuild |
116 |
index 5185441..666d51a 100644 |
117 |
--- a/dev-python/rospkg/rospkg-9999.ebuild |
118 |
+++ b/dev-python/rospkg/rospkg-9999.ebuild |
119 |
@@ -1,4 +1,4 @@ |
120 |
-# Copyright 1999-2014 Gentoo Foundation |
121 |
+# Copyright 1999-2016 Gentoo Foundation |
122 |
# Distributed under the terms of the GNU General Public License v2 |
123 |
# $Id$ |
124 |
|
125 |
@@ -39,18 +39,7 @@ DEPEND="${RDEPEND} |
126 |
dev-python/coverage[${PYTHON_USEDEP}] |
127 |
) |
128 |
" |
129 |
-PATCHES=( |
130 |
- "${FILESDIR}/norecurse.patch" |
131 |
-) |
132 |
|
133 |
python_test() { |
134 |
nosetests --with-coverage --cover-package=rospkg --with-xunit test || die |
135 |
} |
136 |
- |
137 |
-src_install() { |
138 |
- distutils-r1_src_install |
139 |
- |
140 |
- # Avoid recursing into /usr/share when looking for packages. |
141 |
- dodir /usr/share |
142 |
- touch "${ED}/usr/share/rospack_norecurse" |
143 |
-} |