On Wed, 1 Feb 2012 19:33:54 -0500 Mike Frysinger <[email protected]> wrote:
> On Wednesday 01 February 2012 18:12:02 Michał Górny wrote:
> > On Wed, 1 Feb 2012 15:55:46 -0500 Mike Frysinger wrote:
> > > On Wednesday 01 February 2012 15:51:52 Michał Górny wrote:
> > > > On Wed, 1 Feb 2012 15:44:14 -0500 Mike Frysinger wrote:
> > > > > > > # @USAGE: [archives that we will unpack]
> > > > > > > # @RETURN: Dependencies needed to unpack all the archives
> > > > > > > # @DESCRIPTION:
> > > > > > > # Walk all the specified files (defaults to $SRC_URI) and
> > > > > > > figure out the # dependencies that are needed to unpack
> > > > > > > things. #
> > > > > > > # Note: USE flags are not yet handled.
> > > > > > > unpacker_src_uri_depends() {
> > > > > > >
> > > > > > > local uri deps d
> > > > > > >
> > > > > > > [[ $# -eq 0 ]] && set -- ${SRC_URI}
> > > > > > >
> > > > > > > for uri in "$@" ; do
> > > > > > >
> > > > > > > case ${uri} in
> > > > > > > *.rar|*.RAR)
> > > > > > >
> > > > > > > d="app-arch/unrar" ;;
> > > > > > >
> > > > > > > *.7z)
> > > > > > >
> > > > > > > d="app-arch/p7zip" ;;
> > > > > >
> > > > > > Where are those file formats handled? You don't seem to
> > > > > > fallback to 'unpack' anywhere too.
> > > > >
> > > > > eh ? this func doesn't do unpacking, just
> > > > > ${SRC_URI}<->${DEPEND} matching.
> > > >
> > > > Sooo.. it's intended to generate an useless DEPEND
> > >
> > > the ebuild does:
> > > DEPEND+=" $(unpacker_src_uri_depends)"
> > >
> > > > or you have to reset src_unpack() to default to make the
> > > > archives actually extractable.
> > >
> > > this func has nothing to do with extraction. look at the rest of
> > > the code to see how the default src_unpack is handled via standard
> > > EXPORT_FUNC means.
> >
> > Yes, and can that exported default src_unpack() extract either .rar
> > or .7z?
>
> there are no plans for that since portage handles it from EAPI=0
> onwards. i can have _unpacker() automatically tail off into `unpack`
> if it finds a file it doesn't recognize.
Yes, you should do that. Otherwise, I don't see how people would
benefit from:
#v+
SRC_URI="foo-bar-baz.rar"
inherit unpacker
src_unpack() {
default
}
#v-
--
Best regards,
Michał Górny
signature.asc
Description: PGP signature
