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 <gentoo-dev+bounces-49673-garchives=archives.gentoo.org@lists.gentoo.org>) id 1Rsgo0-0008WR-8T for garchives@archives.gentoo.org; Wed, 01 Feb 2012 20:29:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4A0DE07EB; Wed, 1 Feb 2012 20:29:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9E20FE07B6 for <gentoo-dev@lists.gentoo.org>; Wed, 1 Feb 2012 20:28:41 +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 1689C1B4006; Wed, 1 Feb 2012 20:28:37 +0000 (UTC) Date: Wed, 1 Feb 2012 21:30:16 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= <mgorny@gentoo.org> To: gentoo-dev@lists.gentoo.org Cc: vapier@gentoo.org Subject: Re: [gentoo-dev] unpacker.eclass Message-ID: <20120201213016.3ffb6419@pomiocik.lan> In-Reply-To: <201202011505.41142.vapier@gentoo.org> References: <201202011505.41142.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: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> 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_/zx_XZS/BiGvsLGjOgtR/T_U"; protocol="application/pgp-signature" X-Archives-Salt: a08d814f-5e72-4d37-a28c-7e0d9a1635df X-Archives-Hash: 266763afa44d9a220dfd11c0cea3de99 --Sig_/zx_XZS/BiGvsLGjOgtR/T_U Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 1 Feb 2012 15:05:40 -0500 Mike Frysinger <vapier@gentoo.org> wrote: > # You have to specify the off_t size ... I have no idea how to > extract that # information out of the binary executable myself. > Basically you pass in # the size of the off_t type (in bytes) on the > machine that built the pdv # archive. Can't you use 'file' to determine the host type and just assume off_t for it? > # @FUNCTION: unpack_makeself > # @USAGE: [file to unpack] [offset] [tail|dd] > # @DESCRIPTION: > # Unpack those pesky makeself generated files ... > # They're shell scripts with the binary package tagged onto > # the end of the archive. Loki utilized the format as does > # many other game companies. > # > # If the file is not specified, then ${A} is used. If the > # offset is not specified then we will attempt to extract > # the proper offset from the script itself. The third argument is not explained. > unpack_makeself() { > local src_input=3D${1:-${A}} What if ${A} contains more than a single file? Well, what is this for anyway? > case ${exe} in > tail) exe=3D"tail -n +${skip} '${src}'";; > dd) exe=3D"dd ibs=3D${skip} skip=3D1 > if=3D'${src}'";; *) die "makeself cant handle exe > '${exe}'" esac What is the use of that? > # @FUNCTION: unpacker Wrong name. > # @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 >=20 > [[ $# -eq 0 ]] && set -- ${SRC_URI} >=20 > for uri in "$@" ; do > case ${uri} in > *.rar|*.RAR) > d=3D"app-arch/unrar" ;; > *.7z) > d=3D"app-arch/p7zip" ;; Where are those file formats handled? You don't seem to fallback to 'unpack' anywhere too. And I think you should consider using 'file --mime' rather than relying on format descriptions not ever changing/differing due to subtle differences. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/zx_XZS/BiGvsLGjOgtR/T_U Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iJwEAQEIAAYFAk8poN0ACgkQfXuS5UK5QB3n9gQAj2mVamGWHHPcJAyWpRbXQ13l q94tGZ7EOASM2vdOhVArA/oKKKJW3jk7+FdgQmv8LufP9sHP5wTm6FzHbVKmtI1b RLw78t2OdXPzCLaxBbiolpcm37XGy411i8TbvDi+UxZ2qmYRdT5OmTdnDGjgypTf xXz3ZrgEJ4GqoFdL5Ls= =yoMP -----END PGP SIGNATURE----- --Sig_/zx_XZS/BiGvsLGjOgtR/T_U--