You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
733 B

diff -u -r ../dpkg-1.18.2/lib/dpkg/atomic-file.c ./lib/dpkg/atomic-file.c
--- ../dpkg-1.18.2/lib/dpkg/atomic-file.c 2015-07-12 22:38:47.000000000 -0400
+++ ./lib/dpkg/atomic-file.c 2015-08-25 18:06:51.689715379 -0400
@@ -90,8 +90,11 @@
if (unlink(name_old) && errno != ENOENT)
ohshite(_("error removing old backup file '%s'"), name_old);
- if (link(file->name, name_old) && errno != ENOENT)
- ohshite(_("error creating new backup file '%s'"), name_old);
+ if (link(file->name, name_old) && errno != ENOENT) {
+ /* Termux modification: Try with rename(2) for systems not supporting hardlinks. */
+ if (rename(file->name, name_old))
+ ohshite(_("error creating new backup file '%s'"), name_old);
+ }
free(name_old);
}