diff --git a/packages/dpkg/build.sh b/packages/dpkg/build.sh index af5b7a5f7..a03d24567 100755 --- a/packages/dpkg/build.sh +++ b/packages/dpkg/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/dpkg TERMUX_PKG_DESCRIPTION="Debian package management system" TERMUX_PKG_VERSION=1.18.4 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-dselect --disable-shared --disable-start-stop-daemon --disable-largefile --disable-update-alternatives --host=${TERMUX_ARCH}-linux --without-selinux dpkg_cv_c99_snprintf=yes ac_cv_lib_selinux_setexecfilecon=no HAVE_SETEXECFILECON_FALSE=#" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --without-bz2" diff --git a/packages/dpkg/lib-dpkg-atomic-file.c.patch b/packages/dpkg/lib-dpkg-atomic-file.c.patch index 79f0156f0..a4cf91a03 100644 --- a/packages/dpkg/lib-dpkg-atomic-file.c.patch +++ b/packages/dpkg/lib-dpkg-atomic-file.c.patch @@ -1,16 +1,19 @@ 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 @@ +@@ -90,8 +90,14 @@ 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); ++#ifdef __ANDROID__ ++ /* Termux: Use rename(2) since Android does not support hardlinks. */ ++ if (rename(file->name, name_old) && errno != ENOENT) { ++#else + 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); ++#endif ++ ohshite(_("error creating new backup file '%s'"), name_old); + } free(name_old);