+2008-06-17 Juergen Kreileder <jk@blackdown.de>,
+ Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-divert.pl (rename_mv): New function.
+ (dorename): Use rename_mv instead of rename.
+
2008-06-10 Guillem Jover <guillem@debian.org>
* lib/varbuf.c (varbufvprintf): Call va_end when done with the va_list
inherited by the childs. Closes: #471488
* Add '.hgignore' to the default dpkg-source -i regex and -I pattern.
Closes: #485365
+ * Support diverting files when origin and destination are on different file
+ systems. Based on a patch by Juergen Kreileder. Closes: #102144, #149961
[ Raphael Hertzog ]
* Enhance dpkg-shlibdeps's error message when a library can't be found to
}
}
+sub rename_mv($$)
+{
+ return (rename($_[0], $_[1]) || (system(("mv", $_[0], $_[1])) == 0));
+}
+
sub dorename {
return unless $dorename;
return if $testmode;
if (@sdest) {
unlink($rsrc) || &quit(sprintf(_g("rename: remove duplicate old link \`%s': %s"), $rsrc, $!));
} else {
- rename($rsrc,$rdest) || &quit(sprintf(_g("rename: rename \`%s' to \`%s': %s"), $rsrc, $rdest, $!));
+ rename_mv($rsrc, $rdest) ||
+ quit(sprintf(_g("rename: rename \`%s' to \`%s': %s"), $rsrc, $rdest, $!));
}
}
}