Commit 6f08ad4c authored by Jim Nanney's avatar Jim Nanney
Browse files

Add warning when package is bz2 format without bzip2 in path

On CentOS 7 and RHEL 7 bzip2 is not installed by default. This
causes a confusing error from tar when attempting to untar the
package. While this does not solve the problem, it at least gives
the user a more helpful error. More details can be found in GitHub
issue #870
parent 8f1a3904
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -342,6 +342,9 @@ fetch_tarball() {
  local package_filename="${package_name}.tar.gz"

  if [ "$package_url" != "${package_url%bz2}" ]; then
    if ! type -p bzip2 >/dev/null; then
      echo "warning: bzip2 not found; consider installing \`bzip2\` package" >&4
    fi
    package_filename="${package_filename%.gz}.bz2"
    tar_args="${tar_args/z/j}"
  fi