termux-packages/packages/dpkg/extract.c.patch

34 lines
1.0 KiB
Diff

diff -uNr dpkg-1.19.4/dpkg-deb/extract.c dpkg-1.19.4.mod/dpkg-deb/extract.c
--- dpkg-1.19.4/dpkg-deb/extract.c 2019-01-23 04:31:39.000000000 +0200
+++ dpkg-1.19.4.mod/dpkg-deb/extract.c 2019-05-12 21:51:55.872339882 +0300
@@ -309,7 +309,7 @@
if (!c3) {
struct command cmd;
- command_init(&cmd, TAR, "tar");
+ command_init(&cmd, "busybox", "tar");
command_add_arg(&cmd, "tar");
if ((taroption & DPKG_TAR_LIST) && (taroption & DPKG_TAR_EXTRACT))
@@ -321,14 +321,20 @@
else
internerr("unknown or missing tar action '%d'", taroption);
+#ifndef __ANDROID__
+ /* busybox tar does not support this */
if (taroption & DPKG_TAR_PERMS)
command_add_arg(&cmd, "-p");
+#endif
if (taroption & DPKG_TAR_NOMTIME)
command_add_arg(&cmd, "-m");
command_add_arg(&cmd, "-f");
command_add_arg(&cmd, "-");
+#ifndef __ANDROID__
+ /* busybox tar does not support this */
command_add_arg(&cmd, "--warning=no-timestamp");
+#endif
m_dup2(p2[0],0);
close(p2[0]);