[Python-modules-commits] r17757 - in packages/sphinx/trunk/debian (dh_sphinxdoc)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Fri Jul 8 20:49:53 UTC 2011


    Date: Friday, July 8, 2011 @ 20:49:52
  Author: jwilk
Revision: 17757

dh_sphinxdoc: drop .buildinfo files.

Modified:
  packages/sphinx/trunk/debian/dh_sphinxdoc

Modified: packages/sphinx/trunk/debian/dh_sphinxdoc
===================================================================
--- packages/sphinx/trunk/debian/dh_sphinxdoc	2011-07-08 20:40:19 UTC (rev 17756)
+++ packages/sphinx/trunk/debian/dh_sphinxdoc	2011-07-08 20:49:52 UTC (rev 17757)
@@ -159,12 +159,19 @@
     return @deps;
 }
 
-sub drop_doctrees($)
+sub drop_cruft($)
 {
     my ($path) = @_;
-    return if excludefile('.doctrees');
-    my $doctrees = "$path/.doctrees/";
-    doit('rm', '-rf', $doctrees) if -d $doctrees;
+    unless (excludefile('.doctrees'))
+    {
+        my $doctrees = "$path/.doctrees/";
+        doit('rm', '-rf', $doctrees) if -d $doctrees;
+    }
+    unless (excludefile('.buildinfo'))
+    {
+        my $buildinfo = "$path/.buildinfo";
+        doit('rm', '-f', $buildinfo) if -f $buildinfo;
+    }
 }
  
 sub fix_sphinx_doc($$)
@@ -173,7 +180,7 @@
     return 0 if not looks_like_sphinx_doc($path);
     my @js = sanity_check($path);
     my @deps = fix_symlinks($path, @js);
-    drop_doctrees($path);
+    drop_cruft($path);
     map { addsubstvar($package, "sphinxdoc:Depends", $_) } @deps;
     return 1;
 }




More information about the Python-modules-commits mailing list