file: Restore uncompressing tar.bz2 archives.
This commit is contained in:
34
file/02-ignore-exit-code-from-uncompress.patch
Normal file
34
file/02-ignore-exit-code-from-uncompress.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 05463f7b3d4588a656089e20ab53a5b81b875341 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Fri, 12 Dec 2014 16:33:01 +0000
|
||||
Subject: [PATCH] PR/405: Ignore exit code from uncompress programs because
|
||||
some (validly) exit with non-zero code when they get SIGPIPE.
|
||||
|
||||
---
|
||||
src/compress.c | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/compress.c b/src/compress.c
|
||||
index bf93839..30be569 100644
|
||||
--- a/src/compress.c
|
||||
+++ b/src/compress.c
|
||||
@@ -512,11 +512,16 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
|
||||
strerror(errno));
|
||||
#endif
|
||||
n = NODATA;
|
||||
- } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||
+ } else if (!WIFEXITED(status)) {
|
||||
#ifdef DEBUG
|
||||
- (void)fprintf(stderr, "Child status (0x%x)\n", status);
|
||||
+ (void)fprintf(stderr, "Child not exited (0x%x)\n",
|
||||
+ status);
|
||||
+#endif
|
||||
+ } else if (WEXITSTATUS(status) != 0) {
|
||||
+#ifdef DEBUG
|
||||
+ (void)fprintf(stderr, "Child exited (0x%d)\n",
|
||||
+ WEXITSTATUS(status));
|
||||
#endif
|
||||
- n = NODATA;
|
||||
}
|
||||
|
||||
(void) close(fdin[0]);
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pkgname=file
|
||||
pkgver=5.21
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="File type identification utility"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('custom')
|
||||
@@ -13,15 +13,18 @@ makedepends=('python2' 'python3' 'zlib-devel')
|
||||
options=('!libtool')
|
||||
source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
|
||||
file-5.17-msys2.patch
|
||||
01-fix-broken-xz.patch)
|
||||
01-fix-broken-xz.patch
|
||||
02-ignore-exit-code-from-uncompress.patch)
|
||||
md5sums=('549fe96e09041eabece9de2bb28ef923'
|
||||
'c767c9156ea98f38eab968b9d2c0198a'
|
||||
'62c8d81023e1705d8826d79d0a8fdaae')
|
||||
'62c8d81023e1705d8826d79d0a8fdaae'
|
||||
'39e9867b888bf6e2c1664d3c44712f3b')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/file-5.17-msys2.patch
|
||||
patch -p1 -i ${srcdir}/01-fix-broken-xz.patch
|
||||
patch -p1 -i ${srcdir}/02-ignore-exit-code-from-uncompress.patch
|
||||
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user