Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Cc: "Vadim A. Misbakh-Soloviov" <mva@×××.name>, azamat.hackimov@×××××.com
Subject: Re: [gentoo-dev] [RFC] unpacker.eclass extensions
Date: Mon, 17 Jun 2013 05:55:23
Message-Id: 201306170155.10347.vapier@gentoo.org
In Reply to: [gentoo-dev] [RFC] unpacker.eclass extensions by "Vadim A. Misbakh-Soloviov"
1 On Saturday 15 June 2013 04:39:10 Vadim A. Misbakh-Soloviov wrote:
2 > # @DESCRIPTION:
3 > # Unpack nixstaller generated files
4
5 needs a period at the end. content in @DESCRIPTION is normalized.
6
7 > # They're shell scripts with the blob package tagged onto
8 > # the end of the archive. In the blob placed tarballs with
9 > # actual content.
10
11 "They're shell scripts with a tarball appended to them."
12
13 > # Please note, if you need additional dependecies make sure to unpack
14 > subarch
15 > # archive as first argument.
16
17 no idea what this means
18
19 > nixstaller_unpack() {
20
21 this does not follow the API naming convention ("unpack" comes first)
22
23 > local unpack_files="$@"
24
25 this doesn't work. you normalized the input into a string. just inline the
26 "$@" below. or don't specify it at all ... this does the same thing (albeit,
27 correctly):
28 local src
29 for src ; do
30
31 > unpack_banner "$i"
32 > # Make sure that file exists
33 > [[ -f "./$i" ]] && (
34 > local type=$(file -b ${i})
35 > case ${type} in
36 > data)
37 > tar -xJf "./$i"
38
39 why doesn't the bzip2 detect as bzip2 ?
40
41 > ;;
42 > gzip*)
43 > tar -xzf "./$i"
44 > ;;
45 > esac
46 > ) || die "Failed to unpack $i"
47
48 the subshell should go away -- you don't even need it:
49 [[ $? -eq 0 ]] || die ...
50
51 i wish we could merge with the file detection in unpack_makeself somehow
52 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [RFC] unpacker.eclass extensions "Diego Elio Pettenò" <flameeyes@×××××××××.eu>
[gentoo-dev] unpacker.eclass: add decompress probe helper Mike Frysinger <vapier@g.o>