Use tar -f - to read from stdin.

Not all implementations of tar assume reads from stdin if no filename
is given. Fixes extracts on OpenBSD.
This commit is contained in:
Simon Howard 2020-05-16 17:05:50 -04:00
parent 8782712aaf
commit 8fb2d1ea58

View file

@ -62,7 +62,7 @@ fetch_download::extract_package_file() {
local parent_dir=$(dirname "$PACKAGE_BUILD_DIR") local parent_dir=$(dirname "$PACKAGE_BUILD_DIR")
cd "$parent_dir" cd "$parent_dir"
fi fi
(fetch_download::decompress "$dlfile" | tar -x) || ( (fetch_download::decompress "$dlfile" | tar -x -f -) || (
mv "$dlfile" "$dlfile.bad" mv "$dlfile" "$dlfile.bad"
chocpkg::abort "Failed to extract $PACKAGE_FILENAME: bad download?" chocpkg::abort "Failed to extract $PACKAGE_FILENAME: bad download?"
) )