# ChangeLog for app-admin/tmpreaper
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/tmpreaper/ChangeLog,v 1.9 2006/10/19 19:17:48 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/tmpreaper/ChangeLog,v 1.10 2006/12/04 22:13:07 masterdriverz Exp $
+
+*tmpreaper-1.6.6-r1 (04 Dec 2006)
+
+ 04 Dec 2006; Charlie Shepherd <masterdriverz@gentoo.org>
+ +files/tmpreaper-1.6.6-fix-protect.patch, +tmpreaper-1.6.6-r1.ebuild:
+ Fix --protect, thanks to Andy Lutomirski for the patch, bug 114218
*tmpreaper-1.6.6 (19 Oct 2006)
--- /dev/null
+MD5 3a534f8876f318102d7a5ec38584200e tmpreaper_1.6.6.tar.gz 119219
+RMD160 f3979b4506e18e4029fa03420f74be885d4175ec tmpreaper_1.6.6.tar.gz 119219
+SHA256 c0b16e0b123b2ec965047ad94ba7430330aae4e1d017105f9151a4c11d4e5202 tmpreaper_1.6.6.tar.gz 119219
--- /dev/null
+--- tmpreaper.c.orig 2005-11-13 13:30:35.000000000 -0800
++++ tmpreaper.c 2005-11-13 13:31:29.000000000 -0800
+@@ -464,13 +464,6 @@
+ continue;
+ }
+
+- if (S_ISDIR (sb.st_mode)) {
+- cleanupDirectory (ent->d_name, killTime, flags);
+- message (LOG_VERBOSE,
+- "(PID %u) Back from recursing down `%s'.\n",
+- (u_int) getpid(), ent->d_name);
+- }
+-
+ if (FLAGS_PROTECT_P (flags)) {
+ skip = i = 0;
+ do {
+@@ -486,6 +479,13 @@
+ continue;
+ }
+
++ if (S_ISDIR (sb.st_mode)) {
++ cleanupDirectory (ent->d_name, killTime, flags);
++ message (LOG_VERBOSE,
++ "(PID %u) Back from recursing down `%s'.\n",
++ (u_int) getpid(), ent->d_name);
++ }
++
+ /* Decide whether to remove the file or not */
+ /* check for mtime on directory instead of atime if requested */
+ if ( FLAGS_MTIME_P(flags) ||
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/tmpreaper/tmpreaper-1.6.6-r1.ebuild,v 1.1 2006/12/04 22:13:07 masterdriverz Exp $
+
+DESCRIPTION="A utility for removing files based on when they were last accessed"
+HOMEPAGE="http://packages.debian.org/stable/admin/tmpreaper.html"
+SRC_URI="mirror://debian/pool/main/t/tmpreaper/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-fix-protect.patch"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc README ChangeLog debian/{cron.daily,tmpreaper.conf,README*}
+}