From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Rsrgo-0002yd-8q for garchives@archives.gentoo.org; Thu, 02 Feb 2012 08:06:43 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CDFFE0642; Thu, 2 Feb 2012 08:06:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 59AFCE0539 for ; Thu, 2 Feb 2012 08:05:14 +0000 (UTC) Received: from pomiocik.lan (77-254-67-124.adsl.inetia.pl [77.254.67.124]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 323321B400A; Thu, 2 Feb 2012 08:05:11 +0000 (UTC) Date: Thu, 2 Feb 2012 09:06:46 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: vapier@gentoo.org Subject: Re: [gentoo-dev] unpacker.eclass Message-ID: <20120202090646.08129a3a@pomiocik.lan> In-Reply-To: <201202011933.55289.vapier@gentoo.org> References: <201202011505.41142.vapier@gentoo.org> <201202011555.46748.vapier@gentoo.org> <20120202001202.060d6925@pomiocik.lan> <201202011933.55289.vapier@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.9; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/b1rVbvW_N6fP6jdxplWN_qb"; protocol="application/pgp-signature" X-Archives-Salt: 10e16a4c-5db9-46ba-8b47-48280c435638 X-Archives-Hash: 44ba8696c20efc596240fe510346f40b --Sig_/b1rVbvW_N6fP6jdxplWN_qb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 1 Feb 2012 19:33:54 -0500 Mike Frysinger wrote: > On Wednesday 01 February 2012 18:12:02 Micha=C5=82 G=C3=B3rny wrote: > > On Wed, 1 Feb 2012 15:55:46 -0500 Mike Frysinger wrote: > > > On Wednesday 01 February 2012 15:51:52 Micha=C5=82 G=C3=B3rny 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() { > > > > > > >=20 > > > > > > > local uri deps d > > > > > > > =09 > > > > > > > [[ $# -eq 0 ]] && set -- ${SRC_URI} > > > > > > > =09 > > > > > > > for uri in "$@" ; do > > > > > > > =09 > > > > > > > case ${uri} in > > > > > > > *.rar|*.RAR) > > > > > > > =09 > > > > > > > d=3D"app-arch/unrar" ;; > > > > > > > =09 > > > > > > > *.7z) > > > > > > > =09 > > > > > > > d=3D"app-arch/p7zip" ;; > > > > > >=20 > > > > > > Where are those file formats handled? You don't seem to > > > > > > fallback to 'unpack' anywhere too. > > > > >=20 > > > > > eh ? this func doesn't do unpacking, just > > > > > ${SRC_URI}<->${DEPEND} matching. > > > >=20 > > > > Sooo.. it's intended to generate an useless DEPEND > > >=20 > > > the ebuild does: > > > DEPEND+=3D" $(unpacker_src_uri_depends)" > > > =09 > > > > or you have to reset src_unpack() to default to make the > > > > archives actually extractable. > > >=20 > > > 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. > >=20 > > Yes, and can that exported default src_unpack() extract either .rar > > or .7z? >=20 > there are no plans for that since portage handles it from EAPI=3D0 > 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=3D"foo-bar-baz.rar" inherit unpacker src_unpack() { default } #v- --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/b1rVbvW_N6fP6jdxplWN_qb Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iJwEAQEIAAYFAk8qRB8ACgkQfXuS5UK5QB2WdAP/eaC0RSqHPcE9kYSYK4YS6NM1 qAB03nMetBkkOjWOnms566JHOhdD4OW6FDb8ndWT4PkafzNsHxRiDzn25khKuScF pS+g78P5/6KKT6jj9jAKtnB2rj0XYctVSf0H6dvB0fKi2I2c3evdtlXc5wNiEHWf lgeu48Xj8Pk0XLzgfvY= =xjzK -----END PGP SIGNATURE----- --Sig_/b1rVbvW_N6fP6jdxplWN_qb--