public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Vadim A. Misbakh-Soloviov" <mva@mva.name>, azamat.hackimov@gmail.com
Subject: Re: [gentoo-dev] [RFC] unpacker.eclass extensions
Date: Mon, 17 Jun 2013 01:55:09 -0400	[thread overview]
Message-ID: <201306170155.10347.vapier@gentoo.org> (raw)
In-Reply-To: <51BC282E.9020306@mva.name>

[-- Attachment #1: Type: Text/Plain, Size: 1699 bytes --]

On Saturday 15 June 2013 04:39:10 Vadim A. Misbakh-Soloviov wrote:
> # @DESCRIPTION:
> # Unpack nixstaller generated files

needs a period at the end.  content in @DESCRIPTION is normalized.

> # They're shell scripts with the blob package tagged onto
> # the end of the archive. In the blob placed tarballs with
> # actual content.

"They're shell scripts with a tarball appended to them."

> # Please note, if you need additional dependecies make sure to unpack
> subarch
> # archive as first argument.

no idea what this means

> nixstaller_unpack() {

this does not follow the API naming convention ("unpack" comes first)

>         local unpack_files="$@"

this doesn't work.  you normalized the input into a string.  just inline the 
"$@" below.  or don't specify it at all ... this does the same thing (albeit, 
correctly):
	local src
	for src ; do

>                 unpack_banner "$i"
>                 # Make sure that file exists
>                 [[ -f "./$i" ]] && (
>                         local type=$(file -b ${i})
>                         case ${type} in
>                                 data)
>                                         tar -xJf "./$i"

why doesn't the bzip2 detect as bzip2 ?

>                                         ;;
>                                 gzip*)
>                                         tar -xzf "./$i"
>                                         ;;
>                         esac
>                 ) || die "Failed to unpack $i"

the subshell should go away -- you don't even need it:
	[[ $? -eq 0 ]] || die ...

i wish we could merge with the file detection in unpack_makeself somehow
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-06-17  5:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15  8:39 [gentoo-dev] [RFC] unpacker.eclass extensions Vadim A. Misbakh-Soloviov
2013-06-15 14:33 ` Markos Chandras
2013-06-15 14:37   ` Markos Chandras
2013-06-17  5:55 ` Mike Frysinger [this message]
2013-06-17  7:15   ` Diego Elio Pettenò
2013-06-17 16:08     ` Mike Frysinger
2013-06-17 16:54       ` Rick "Zero_Chaos" Farina
2013-06-17 20:19         ` Diego Elio Pettenò
2013-06-17 20:37           ` Rick "Zero_Chaos" Farina
2013-06-17 21:41             ` Brian Dolbec
2013-06-19 21:15             ` Mike Frysinger
2013-06-22 17:55   ` [gentoo-dev] unpacker.eclass: add decompress probe helper Mike Frysinger

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=201306170155.10347.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=azamat.hackimov@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mva@mva.name \
    /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