meta-ros/recipes-ros/ros-comm
Lukas Bulwahn a1153b8ce8 rosclean: simplifying run-time dependencies
When roslaunch is started, it checks the file size of the local log
directory by calling:

    disk_usage = rosclean.get_disk_usage(d) [1]

The function `get_disk_usage` [2] in rosclean creates a subprocess and
calls `du -sb` on Linux systems (cf. [3]).

However, the `du` command, which busybox usually provides on an
embedded Linux image, does not support the `-b` option, and only the
`du` command from the coreutils [4] supports this option.
This issue was first reported in April 2013 on the meta-ros issue
tracker [5]. Hence, on the first iteration of this issue, the
commit db0c8d5c [6] simply adds the dependency on coreutils to
roslaunch.

However, this has certain disadvantages:
  - coreutils is licensed under GPLv3 and must not be deployed in a
    product, which is massively distributed to customers.
  - coreutils has larger file-system foot print than busybox and makes
    the minimal Linux images considerably larger.

As a fortuitous circumstance, Alexis Ballier [7] had already observed
this disadvantage and provides a patch [8, 9] that makes
`get_disk_usage` use `du -k`, which works with busybox and coreutils.

So, on the second iteration of this issue, this commit here patches
rosclean's `get_disk_usage` function with the aforementioned patch.
This slightly modifies the semantics of this function. However, I
believe this plays only a minor role for the overall intended
functionality to check if the log usage has reached a critical file-size
limit, and it allows us to remove the dependency on coreutils, which is
much more critical.

Andreas Baak reported the disadvantages of the previous solution, which
triggered the re-investigation. The current resolution has been
discussed and worked out in collaboration with Andreas Baak.

[1] 9da29441f3/tools/roslaunch/src/roslaunch/rlutil.py (L63)
[2] c6e91f9af1/tools/rosclean/src/rosclean/__init__.py (L120)
[3] c6e91f9af1/tools/rosclean/src/rosclean/__init__.py (L130)
[4] http://cgit.openembedded.org/cgit.cgi/openembedded-core/tree/meta/recipes-core/coreutils/coreutils_8.23.bb?h=master
[5] https://github.com/bmwcarit/meta-ros/issues/60
[6] db0c8d5cd1
[7] https://github.com/aballier
[8] https://github.com/ros/ros/pull/76
[9] bbf1f945c7

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Andreas Baak <andreas.baak@bmw-carit.de>
2015-03-02 13:21:44 +01:00
..
files ros-comm: correcting patch after manual change (resolves #254) 2014-04-25 06:58:50 +02:00
roslaunch roslaunch: Use as documented environment 2014-12-02 23:16:43 +01:00
message-filters_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
ros-comm.inc ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosbag-storage_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosbag_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosconsole_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
roscpp_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosgraph-msgs_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosgraph_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
roslaunch_1.10.12.bb rosclean: simplifying run-time dependencies 2015-03-02 13:21:44 +01:00
rosmaster_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosmsg_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosnode_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosout_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosparam_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rospy_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rosservice_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rostest_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
rostopic_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
roswtf_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
std-srvs_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
topic-tools_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00
xmlrpcpp_1.10.12.bb ros-comm: updating to 1.10.12 2015-01-21 09:23:17 +01:00