2016-12-03 22:55:45 +01:00
|
|
|
diff -u -r ../dpkg-1.18.15/src/configure.c ./src/configure.c
|
|
|
|
--- ../dpkg-1.18.15/src/configure.c 2016-11-11 22:18:40.000000000 -0500
|
|
|
|
+++ ./src/configure.c 2016-12-03 16:32:43.719508056 -0500
|
|
|
|
@@ -497,8 +497,10 @@
|
2016-03-03 23:45:46 +01:00
|
|
|
pkg_name(pkg, pnaw_nonambig), cdr2.buf,
|
|
|
|
strerror(errno));
|
|
|
|
if (!(what & CFOF_USER_DEL))
|
|
|
|
- if (link(cdr.buf, cdr2.buf))
|
|
|
|
- warning(_("%s: failed to link '%.250s' to '%.250s': %s"),
|
|
|
|
+ /** Termux modification: Use rename(2) instead of link(2), to avoid hard
|
|
|
|
+ links which does not work on Android 6.0 or later. */
|
|
|
|
+ if (rename(cdr.buf, cdr2.buf))
|
|
|
|
+ warning(_("%s: failed to rename '%.250s' to '%.250s': %s"),
|
|
|
|
pkg_name(pkg, pnaw_nonambig), cdr.buf,
|
|
|
|
cdr2.buf, strerror(errno));
|
|
|
|
/* Fall through. */
|
2016-12-03 22:55:45 +01:00
|
|
|
@@ -757,7 +759,9 @@
|
|
|
|
pkg_name(pkg, pnaw_nonambig), in,
|
|
|
|
result->buf, strerror(errno));
|
|
|
|
return -1;
|
|
|
|
- } else if (r != stab.st_size) {
|
|
|
|
+ } else if (r > stab.st_size) {
|
|
|
|
+ /* Termux patch: In some cases st_size is too large, ignore that.
|
|
|
|
+ See https://github.com/corbinlc/GNURootDebian/issues/103 */
|
|
|
|
warning(_("symbolic link '%.250s' size has "
|
|
|
|
"changed from %jd to %zd"),
|
|
|
|
result->buf, (intmax_t)stab.st_size, r);
|