Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] unpacker.eclass
Date: Wed, 01 Feb 2012 20:44:41
Message-Id: 201202011544.14657.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] unpacker.eclass by "Michał Górny"
1 On Wednesday 01 February 2012 15:30:16 Michał Górny wrote:
2 > On Wed, 1 Feb 2012 15:05:40 -0500 Mike Frysinger wrote:
3 > > # You have to specify the off_t size ... I have no idea how to
4 > > extract that # information out of the binary executable myself.
5 > > Basically you pass in # the size of the off_t type (in bytes) on the
6 > > machine that built the pdv # archive.
7 >
8 > Can't you use 'file' to determine the host type and just assume off_t
9 > for it?
10
11 i'm not looking for feedback on the unpack_{makeself,pdv} at this point in
12 time. i'll look after the eutils->unpacker migration is done.
13
14 > > # @FUNCTION: unpacker
15 >
16 > Wrong name.
17
18 fixed
19
20 > > # @USAGE: [archives that we will unpack]
21 > > # @RETURN: Dependencies needed to unpack all the archives
22 > > # @DESCRIPTION:
23 > > # Walk all the specified files (defaults to $SRC_URI) and figure out
24 > > the # dependencies that are needed to unpack things.
25 > > #
26 > > # Note: USE flags are not yet handled.
27 > > unpacker_src_uri_depends() {
28 > >
29 > > local uri deps d
30 > >
31 > > [[ $# -eq 0 ]] && set -- ${SRC_URI}
32 > >
33 > > for uri in "$@" ; do
34 > >
35 > > case ${uri} in
36 > > *.rar|*.RAR)
37 > >
38 > > d="app-arch/unrar" ;;
39 > >
40 > > *.7z)
41 > >
42 > > d="app-arch/p7zip" ;;
43 >
44 > Where are those file formats handled? You don't seem to fallback to
45 > 'unpack' anywhere too.
46
47 eh ? this func doesn't do unpacking, just ${SRC_URI}<->${DEPEND} matching.
48
49 > And I think you should consider using 'file --mime' rather than
50 > relying on format descriptions not ever changing/differing due to
51 > subtle differences.
52
53 probably worth looking at
54 -mike

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] unpacker.eclass "Michał Górny" <mgorny@g.o>