Просмотр исходного кода

dpkg-source: minor update to "3.0 (quilt)" format

Do not update/create debian/patches/.dpkg-source-applied during build,
it's only meant to document what patches have been applied at extraction
time.

Also try to cleanup in case the patch serie is empty after removal of the
automatic patch. First remove debian/patches/series if it's empty and then
debian/patches/ itself in case it's empty as well.
Raphael Hertzog лет назад: 17
Родитель
Сommit
57c5a9dd52
3 измененных файлов с 6 добавлено и 3 удалено
  1. 3 0
      debian/changelog
  2. 1 0
      scripts/Dpkg/Source/Package/V2.pm
  3. 2 3
      scripts/Dpkg/Source/Package/V3/quilt.pm

+ 3 - 0
debian/changelog

@@ -74,6 +74,9 @@ dpkg (1.15.1) UNRELEASED; urgency=low
     well registered with quilt even when it's updated by a new call to
     dpkg-source. Thanks to Goswin von Brederlow for the initial patch.
     Closes: #525858
+  * Do not update/create debian/patches/.dpkg-source-applied during build,
+    it's only meant to document what patches have been applied at extraction
+    time. Closes: #525835
 
   [ Guillem Jover ]
   * Fix typo in dpkg output (‘unexecpted’ → ‘unexpected’). Closes: #519082

+ 1 - 0
scripts/Dpkg/Source/Package/V2.pm

@@ -386,6 +386,7 @@ sub do_build {
                 syserr(_g("unable to change permission of `%s'"), $autopatch);
     }
     $self->register_autopatch($dir);
+    rmdir(File::Spec->catdir($dir, "debian", "patches")); # No check on purpose
     pop @Dpkg::Exit::handlers;
 
     # Remove the temporary directory

+ 2 - 3
scripts/Dpkg/Source/Package/V3/quilt.pm

@@ -262,9 +262,6 @@ sub register_autopatch {
                 print SERIES "$auto_patch\n";
                 close(SERIES);
             }
-            open(APPLIED, ">>", $applied) || syserr(_g("cannot write %s"), $applied);
-            print APPLIED "$auto_patch\n";
-            close(APPLIED);
         } else {
             # If quilt was used, ensure its meta-information are
             # synchronized with the updated patch
@@ -293,6 +290,8 @@ sub register_autopatch {
                                  wait_child => 1, to_file => '/dev/null');
             }
         }
+        # Clean up empty series
+        unlink($series) if not -s $series;
     }
 }