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

Dpkg::Source::Quilt: Fix chmod() arguments order

In the restore_quilt_backup_files() function, the chmod() call has the
arguments swapped. This prevents restoring quilt patches that remove
files.

Closes: #710265

Signed-off-by: Guillem Jover <guillem@debian.org>
Pablo Oliveira лет назад: 13
Родитель
Сommit
7f00d62776
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/Dpkg/Source/Quilt.pm

+ 2 - 0
debian/changelog

@@ -133,6 +133,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
     as a user-friendly frontend.
   * Remove temporary file on error during «dpkg-divert --rename».
   * Fix value caching in Dpkg::Arch by not shadowing the variables.
+  * Fix chmod() arguments order in Dpkg::Source::Quilt. Closes: #710265
+    Thanks to Pablo Oliveira <pablo@sifflez.org>.
 
   [ Raphaël Hertzog ]
   * Fix dpkg-maintscript-helper rm_conffile and mv_conffile to do nothing

+ 1 - 1
scripts/Dpkg/Source/Quilt.pm

@@ -294,7 +294,7 @@ sub restore_quilt_backup_files {
                 unless (link($_, $target)) {
                     copy($_, $target) ||
                         syserr(_g('failed to copy %s to %s'), $_, $target);
-                    chmod($target, (stat(_))[2]) ||
+                    chmod((stat(_))[2], $target) ||
                         syserr(_g("unable to change permission of `%s'"), $target);
                 }
             } else {