From 8ffba00d9157e99cad2685db420e1dce38c51794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 9 Nov 2022 19:36:30 +0700 Subject: [PATCH] do-extract: extract rpm with bsdtar, too --- common/hooks/do-extract/00-distfiles.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index b3f3b90b7b80..14503de3ed76 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -111,14 +111,12 @@ hook() { fi ;; rpm) - if command -v rpmextract &>/dev/null; then - cd "$extractdir" - rpmextract $srcdir/$curfile - if [ $? -ne 0 ]; then - msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" - fi - else - msg_error "$pkgver: cannot find rpmextract for extraction.\n" + if ! command -v bsdtar &>/dev/null; then + msg_error "$pkgver: cannot find bsdtar for extraction.\n" + fi + bsdtar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C "$extractdir" + if [ $? -ne 0 ]; then + msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" fi ;; deb)