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>
@@ -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
@@ -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 {