| 1 | (1) Do not check for ldconfig in checkpath() |
| 2 | (2) Handle EROFS in ensure_pathname_nonexisting(). |
| 3 | This is since ensure_pathname_nonexisting() will be called with |
| 4 | '/data.dpkg-tmp' |
| 5 | '/data/data.dpkg-tmp' |
| 6 | '/data/data/com.termux.dpkg-tmp' |
| 7 | '/data/data/com.termux/files.dpkg-tmp' |
| 8 | '/data/data/com.termux/files/usr.dpkg-tmp' |
| 9 | and the first call will get a EROFS, read-only file system error. |
| 10 | |
| 11 | diff -u -r ../dpkg-1.17.23/src/help.c ./src/help.c |
| 12 | --- ../dpkg-1.17.23/src/help.c 2014-12-27 17:21:19.000000000 -0500 |
| 13 | +++ ./src/help.c 2015-01-01 19:08:58.868327880 -0500 |
| 14 | @@ -89,12 +89,14 @@ |
| 15 | TAR, |
| 16 | FIND, |
| 17 | BACKEND, |
| 18 | +#ifndef __ANDROID__ |
| 19 | /* Mac OS X uses dyld (Mach-O) instead of ld.so (ELF), and does not have |
| 20 | * an ldconfig. */ |
| 21 | -#if defined(__APPLE__) && defined(__MACH__) |
| 22 | +# if defined(__APPLE__) && defined(__MACH__) |
| 23 | "update_dyld_shared_cache", |
| 24 | -#else |
| 25 | +# else |
| 26 | "ldconfig", |
| 27 | +# endif |
| 28 | #endif |
| 29 | #if BUILD_START_STOP_DAEMON |
| 30 | "start-stop-daemon", |
| 31 | @@ -376,7 +378,7 @@ |
| 32 | debug(dbg_eachfile, "ensure_pathname_nonexisting '%s'", pathname); |
| 33 | if (!rmdir(pathname)) |
| 34 | return; /* Deleted it OK, it was a directory. */ |
| 35 | - if (errno == ENOENT || errno == ELOOP) return; |
| 36 | + if (errno == ENOENT || errno == ELOOP || errno == EROFS) return; |
| 37 | if (errno == ENOTDIR) { |
| 38 | /* Either it's a file, or one of the path components is. If one |
| 39 | * of the path components is this will fail again ... */ |