Fix --protect, thanks to Andy Lutomirski for the patch, bug 114218
authorCharlie Shepherd <masterdriverz@gentoo.org>
Mon, 4 Dec 2006 22:13:07 +0000 (22:13 +0000)
committerCharlie Shepherd <masterdriverz@gentoo.org>
Mon, 4 Dec 2006 22:13:07 +0000 (22:13 +0000)
Package-Manager: portage-2.1.2_rc2-r2

app-admin/tmpreaper/ChangeLog
app-admin/tmpreaper/files/digest-tmpreaper-1.6.6-r1 [new file with mode: 0644]
app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch [new file with mode: 0644]
app-admin/tmpreaper/tmpreaper-1.6.6-r1.ebuild [new file with mode: 0644]

index 54de9bc6f9974b8091235e62b38a2727c37c9b63..483e0d1abe581f29b35c2e63376e660bd3cc6db1 100644 (file)
@@ -1,6 +1,12 @@
 # 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)
 
diff --git a/app-admin/tmpreaper/files/digest-tmpreaper-1.6.6-r1 b/app-admin/tmpreaper/files/digest-tmpreaper-1.6.6-r1
new file mode 100644 (file)
index 0000000..cfe5082
--- /dev/null
@@ -0,0 +1,3 @@
+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
diff --git a/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch b/app-admin/tmpreaper/files/tmpreaper-1.6.6-fix-protect.patch
new file mode 100644 (file)
index 0000000..8b114c1
--- /dev/null
@@ -0,0 +1,30 @@
+--- 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) ||
diff --git a/app-admin/tmpreaper/tmpreaper-1.6.6-r1.ebuild b/app-admin/tmpreaper/tmpreaper-1.6.6-r1.ebuild
new file mode 100644 (file)
index 0000000..3894e00
--- /dev/null
@@ -0,0 +1,25 @@
+# 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*}
+}