]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_clean
dh_clean: Do not delete *-stamp files in -k mode in v7. Closes: #489918
[debhelper.git] / dh_clean
index c7465d395b24cc32460db57b392d1514c00fb389..5fd7f936cb5779c4db8152179acac82ae8295936 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -36,8 +36,7 @@ clean target in debian/rules.
 
 =item B<-k>, B<--keep>
 
-This causes L<dh_prep(1)> to be run instead of dh_clean, for backwards
-compatibility.
+This is deprecated, use L<dh_prep(1)> instead.
 
 =item B<-d>, B<--dirs-only>
 
@@ -122,7 +121,7 @@ if (! $dh{D_FLAG}) {
 doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1) &&
                                    ! excludefile("debian/tmp");
 
-if (!compat(6)) {
+if (!compat(6) && !$dh{K_FLAG}) {
        complex_doit('rm -f *-stamp');
 }