Package: debmirror
Version: 20070123
Severity: wishlist

hi

this patch avoids calling 'rmdir' uselessly ; it should be faster
(though I did not benchmark it carefully)

a.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-amd64
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages debmirror depends on:
ii  bzip2                       1.0.3-6      high-quality block-sorting file co
ii  libcompress-zlib-perl       1.42-2       Perl module for creation and manip
ii  libdigest-sha1-perl         2.11-1       NIST SHA-1 message digest algorith
ii  liblockfile-simple-perl     0.2.5-7      Simple advisory file locking
ii  libwww-perl                 5.805-1      WWW client/server library for Perl
ii  perl [libdigest-md5-perl]   5.8.8-7etch1 Larry Wall's Practical Extraction 
ii  perl-modules [libnet-perl]  5.8.8-7etch1 Core Perl modules
ii  rsync                       2.6.9-2etch1 fast remote file copy program (lik

Versions of packages debmirror recommends:
ii  ed                            0.2-20     The classic unix line editor
ii  gnupg                         1.4.6-2    GNU privacy guard - a free PGP rep
ii  patch                         2.5.9-4    Apply a diff file to an original

-- no debconf information

-- 
Andrea Mennucc

"The EULA sounds like it was written by a team of lawyers who want to tell 
me what I can't do, and the GPL sounds like it was written by a human 
being who wants me to know what I can do."
Anonymous,    http://www.securityfocus.com/columnists/420
--- /tmp/debmirror.mine	2007-11-27 11:17:22.000000000 +0100
+++ bin/debmirror.mine	2007-11-27 11:21:30.000000000 +0100
@@ -1105,7 +1105,7 @@
   # makes directories.. Sort so they are removable in bottom-up
   # order.
   chdir($mirrordir) or die "chdir $mirrordir: $!";
-  system("find . -depth -type d ! -name . ! -name .. -print0 | xargs -0 rmdir 2>/dev/null") if (! $dry_run);
+  system("find . -depth -type d -empty -not -name . -print0 | xargs -r0 rmdir") if (! $dry_run);
 }
 
 if ($res == 0) {

Reply via email to