From 8b77dd010a9bd2823db4172fd8418ab3ce9f9f57 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Tue, 22 Sep 2015 13:52:21 +0200 Subject: [PATCH] dev-ros/rosclean: Initial import. Ebuild by me. Package-Manager: portage-2.2.21 --- dev-ros/rosclean/Manifest | 1 + dev-ros/rosclean/files/bb.patch | 26 +++++++++++++++++++++++++ dev-ros/rosclean/metadata.xml | 5 +++++ dev-ros/rosclean/rosclean-1.12.3.ebuild | 23 ++++++++++++++++++++++ dev-ros/rosclean/rosclean-9999.ebuild | 23 ++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 dev-ros/rosclean/Manifest create mode 100644 dev-ros/rosclean/files/bb.patch create mode 100644 dev-ros/rosclean/metadata.xml create mode 100644 dev-ros/rosclean/rosclean-1.12.3.ebuild create mode 100644 dev-ros/rosclean/rosclean-9999.ebuild diff --git a/dev-ros/rosclean/Manifest b/dev-ros/rosclean/Manifest new file mode 100644 index 000000000000..02c7ccc4a2ae --- /dev/null +++ b/dev-ros/rosclean/Manifest @@ -0,0 +1 @@ +DIST ros-1.12.3.tar.gz 162506 SHA256 49b9368e901d69f464b46c9ff0d12843d413fe20c4271225dbb75169bb82a47e SHA512 fe740f357959ed2cabcf0d902c7f1ebe6a7dedd11376ec76e5f47383b0b29b15127306255bea9adb3a48b2872a681a10302f9b0c4da4625c31bcc78522b66d7c WHIRLPOOL d57a877f7b7dc2a6613d3ea07b59e740e25bfffbcec51fa4ce826ccdc9f95dd9aed121736f46338068f9cf06b52a6abc8462ce663bbd4519e7d93f16422995f5 diff --git a/dev-ros/rosclean/files/bb.patch b/dev-ros/rosclean/files/bb.patch new file mode 100644 index 000000000000..e13668f4b774 --- /dev/null +++ b/dev-ros/rosclean/files/bb.patch @@ -0,0 +1,26 @@ +commit bbf1f945c7e3a54efca912d38fe8b1b2f5b63988 +Author: Alexis Ballier +Date: Thu Jan 22 09:56:41 2015 +0100 + + rosclean: Use "du -sk * 1024" on Linux for getting disk usage since "du -b" is not supported by busybox du, while "du -k" is supported by both coreutils and busybox. + +diff --git a/tools/rosclean/src/rosclean/__init__.py b/tools/rosclean/src/rosclean/__init__.py +index 5dafb05..6f051f1 100644 +--- a/tools/rosclean/src/rosclean/__init__.py ++++ b/tools/rosclean/src/rosclean/__init__.py +@@ -121,13 +121,13 @@ def get_disk_usage(d): + """ + Get disk usage in bytes for directory + :param d: directory path, ``str`` +- :returns: disk usage in bytes (du -b) or (du -A) * 1024, ``int`` ++ :returns: disk usage in bytes (du -k) * 1024 or (du -A) * 1024, ``int`` + :raises: :exc:`CleanupException` If get_disk_usage() cannot be used on this platform + """ + # only implemented on Linux and FreeBSD for now. Should work on OS X but need to verify first (du is not identical) + if platform.system() == 'Linux': + try: +- return int(subprocess.Popen(['du', '-sb', d], stdout=subprocess.PIPE).communicate()[0].split()[0]) ++ return int(subprocess.Popen(['du', '-sk', d], stdout=subprocess.PIPE).communicate()[0].split()[0]) * 1024 + except: + raise CleanupException("rosclean is not supported on this platform") + elif platform.system() == 'FreeBSD': diff --git a/dev-ros/rosclean/metadata.xml b/dev-ros/rosclean/metadata.xml new file mode 100644 index 000000000000..c42ea5b15cf6 --- /dev/null +++ b/dev-ros/rosclean/metadata.xml @@ -0,0 +1,5 @@ + + + +ros + diff --git a/dev-ros/rosclean/rosclean-1.12.3.ebuild b/dev-ros/rosclean/rosclean-1.12.3.ebuild new file mode 100644 index 000000000000..17d830ab2ddd --- /dev/null +++ b/dev-ros/rosclean/rosclean-1.12.3.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +ROS_REPO_URI="https://github.com/ros/ros" +KEYWORDS="~amd64 ~arm" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +ROS_SUBDIR=tools/${PN} + +inherit ros-catkin + +DESCRIPTION="Cleanup filesystem resources (e.g. log files)" +LICENSE="BSD" +SLOT="0" +IUSE="" + +RDEPEND="dev-python/rospkg[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" +PATCHES=( "${FILESDIR}/bb.patch" ) diff --git a/dev-ros/rosclean/rosclean-9999.ebuild b/dev-ros/rosclean/rosclean-9999.ebuild new file mode 100644 index 000000000000..17d830ab2ddd --- /dev/null +++ b/dev-ros/rosclean/rosclean-9999.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +ROS_REPO_URI="https://github.com/ros/ros" +KEYWORDS="~amd64 ~arm" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +ROS_SUBDIR=tools/${PN} + +inherit ros-catkin + +DESCRIPTION="Cleanup filesystem resources (e.g. log files)" +LICENSE="BSD" +SLOT="0" +IUSE="" + +RDEPEND="dev-python/rospkg[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" +PATCHES=( "${FILESDIR}/bb.patch" ) -- 2.26.2