Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] 00-disfile.sh: allow bsdtar for zip and 7z archives
Date: Sun, 19 Jan 2020 20:09:40 +0100	[thread overview]
Message-ID: <20200119190940.HCUcW1zAGJoSjofdypUSYR0D2A-V1C884HxaO_QsmTc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18399@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 349 bytes --]

There is an updated pull request by mobinmob against master on the void-packages repository

https://github.com/mobinmob/void-packages bsdtar.zip.7z
https://github.com/void-linux/void-packages/pull/18399

00-disfile.sh: allow bsdtar for zip and 7z archives


A patch file from https://github.com/void-linux/void-packages/pull/18399.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bsdtar.zip.7z-18399.patch --]
[-- Type: text/x-diff, Size: 1564 bytes --]

From f022819dfc376235556c12d389896839db927aa3 Mon Sep 17 00:00:00 2001
From: mobinmob <mobinmob@disroot.org>
Date: Sun, 19 Jan 2020 21:06:55 +0200
Subject: [PATCH] 00-distfiles.sh: allow bsdtar for zip and 7z archives

---
 common/hooks/do-extract/00-distfiles.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index 6463274c6dd..c6bfe25fbfa 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -98,8 +98,13 @@ hook() {
 				if [ $? -ne 0 ]; then
 					msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
 				fi
+			elif command -v bsdtar &>/dev/null; then
+				bsdtar -xf $srcdir/$curfile -C $extractdir
+				if [ $? -ne 0 ]; then
+					msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
+				fi
 			else
-				msg_error "$pkgver: cannot find unzip bin for extraction.\n"
+				msg_error "$pkgver: cannot find unzip or bsdtar bin for extraction.\n"
 			fi
 			;;
 		rpm)
@@ -122,8 +127,13 @@ hook() {
 				if [ $? -ne 0 ]; then
 					msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
 				fi
+			elif command -v bsdtar &>/dev/null; then
+				bsdtar -xf $srcdir/$curfile -C $extractdir
+				if [ $? -ne 0 ]; then
+					msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
+				fi
 			else
-				msg_error "$pkgver: cannot find 7z bin for extraction.\n"
+				msg_error "$pkgver: cannot find 7z or bsdtar bin for extraction.\n"
 			fi
 			;;
 		gem)

  reply	other threads:[~2020-01-19 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 19:08 [PR PATCH] " voidlinux-github
2020-01-19 19:09 ` voidlinux-github [this message]
2020-01-24 13:53 ` [PR PATCH] [Merged]: 00-distfiles.sh: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200119190940.HCUcW1zAGJoSjofdypUSYR0D2A-V1C884HxaO_QsmTc@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).