]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_clean
updates
[debhelper.git] / dh_clean
index 96b8113a8f1e9ca13ae465d0fe3b24fb386e2c9f..e20d988f299c32b21b58f6b94e9d754a1758d603 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-
+exit 1;
 =head1 NAME
 
 dh_clean - clean up package build directories
@@ -33,13 +33,13 @@ The debian/clean file can list other files to be removed.
 
 =item B<-k>, B<--keep>
 
-Do not delete debian/files. When do you want to use this? Anytime you have a
-debian/rules that has 2 binary targets that build different .deb packages;
-for example, one target is binary-arch, and the other is binary-indep, or
-one target builds the shared library, and the other the -dev package. If you
-didn't use -k in these cases, then debian/files would be deleted in the
-middle, and your changes file will only contain the last binary package that
-was built.
+Do not delete debian/files, or files listed in debian/clean. When do you
+want to use this? Anytime you have a debian/rules that has 2 binary targets
+that build different .deb packages; for example, one target is binary-arch,
+and the other is binary-indep, or one target builds the shared library, and
+the other the -dev package. If you didn't use -k in these cases, then
+debian/files would be deleted in the middle, and your changes file will
+only contain the last binary package that was built.
 
 =item B<-d>, B<--dirs-only>
 
@@ -73,6 +73,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                # These are all debhelper temp files, and so it is safe to 
                # wildcard them.
                complex_doit("rm -f debian/$ext*.debhelper");
+               
+               if (! $dh{K_FLAG}) {
+                       doit("rm","-f","debian/${ext}debhelper.log");
+               }
        }
        
        doit ("rm","-rf",$tmp."/")
@@ -83,14 +87,14 @@ if (! $dh{D_FLAG}) {
        if (@ARGV) {
                doit("rm","-f","--",@ARGV);
        }
-       
-       if (!compat(6) && -e "debian/clean") {
-               my @clean=grep { ! excludefile($_) }
-                       filearray("debian/clean", ".");
-               doit("rm","-f","--",@clean) if @clean;
-       }
 
        if (! $dh{K_FLAG}) {
+               if (!compat(6) && -e "debian/clean") {
+                       my @clean=grep { ! excludefile($_) }
+                               filearray("debian/clean", ".");
+                       doit("rm","-f","--",@clean) if @clean;
+               }
+
                doit("rm","-f","debian/files")
                        unless excludefile("debian/files");
        }