Package: dpkg
Version: 1.17.6
Severity: wishlist
Tags: patch

Running dpkg-source on a source directory with a removed file
give the following error message:

$ dpkg-source --commit
dpkg-source: warning: ignoring deletion of file foo

In some cases it might actually be useful to record the deletion,
e.g. if a broken test case should be removed with the patch.

Attached patch improves the error message so it redirects the
user to the --include-removal option.

Cheers,
        Moritz
diff -aur dpkg-1.17.6.orig/scripts/Dpkg/Source/Patch.pm dpkg-1.17.6/scripts/Dpkg/Source/Patch.pm
--- dpkg-1.17.6.orig/scripts/Dpkg/Source/Patch.pm	2013-12-14 06:31:03.000000000 +0100
+++ dpkg-1.17.6/scripts/Dpkg/Source/Patch.pm	2014-02-09 02:10:03.155885592 +0100
@@ -227,12 +227,12 @@
                 push @diff_files, [$fn, 0, 0, "$old/$fn", '/dev/null',
                                    "$basedir.orig/$fn", '/dev/null'];
             } else {
-                warning(_g('ignoring deletion of file %s'), $fn);
+                warning(_g('ignoring deletion of file %s, use --include-removal to override'), $fn);
             }
         } elsif (-d _) {
-            warning(_g('ignoring deletion of directory %s'), $fn);
+            warning(_g('ignoring deletion of directory %s, use --include-removal to override'), $fn);
         } elsif (-l _) {
-            warning(_g('ignoring deletion of symlink %s'), $fn);
+            warning(_g('ignoring deletion of symlink %s, use --include-removal to override'), $fn);
         } else {
             $self->_fail_not_same_type("$old/$fn", "$new/$fn");
         }
Nur in dpkg-1.17.6/scripts/Dpkg/Source: Patch.pm~.

Reply via email to