From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 087F41381F3 for ; Sat, 15 Jun 2013 14:33:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C661FE09CB; Sat, 15 Jun 2013 14:33:52 +0000 (UTC) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BFB20E0973 for ; Sat, 15 Jun 2013 14:33:51 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id u53so1225802wes.23 for ; Sat, 15 Jun 2013 07:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=9dh4ZWXaKPpyemTGqkPuByR19Gy32T0qJYLwxHLFD/Q=; b=ln7lSfnfiGIhlOFRB2/9OBroqnCpfQC3UZmnIsaT+jHJeoVIyPq5OnSMHFPuU3Uljf ZqkaykkxZv6kElc0kblvYqlmLYWfQlLSESo72uHP36f1xYlAifgyYwWKUdD0n+wy55m/ YKFnrrhYMPffTFAZJ/gSg2xQyCB9hfkdc4Vl9gDPnDs49EMzVeMZV3nDW9k+XtEMcY36 94f9Qc2cJhB2kpsN2UqvpovTnmpylTe6iaQpa1ZK5Zk8AN4TMPTYwI31bAxnnadBXK36 CaMmVWb/OIRz6oVnR9aJKqE7irOO6bcZn2NnVEdsjN3cYPwCZOyOyQ5sq4aonLD84xWh ENMQ== X-Received: by 10.180.77.74 with SMTP id q10mr621391wiw.28.1371306830486; Sat, 15 Jun 2013 07:33:50 -0700 (PDT) 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 Sender: markos.chandras@gmail.com Received: by 10.194.136.115 with HTTP; Sat, 15 Jun 2013 07:33:10 -0700 (PDT) In-Reply-To: <51BC282E.9020306@mva.name> References: <51BC282E.9020306@mva.name> From: Markos Chandras Date: Sat, 15 Jun 2013 15:33:10 +0100 X-Google-Sender-Auth: XMNJdPn716MVQmncqFl1M7Q0J2o Message-ID: Subject: Re: [gentoo-dev] [RFC] unpacker.eclass extensions To: gentoo-dev Cc: azamat.hackimov@gmail.com Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: dd34bffe-61ea-4ac8-a3ac-6f41ae9e8639 X-Archives-Hash: ac11c5eb4c57cc11aea2449832b624e9 Hi Vadim, On 15 June 2013 09:39, Vadim A. Misbakh-Soloviov wrote: > # Make sure that file exists > [[ -f "./$i" ]] && ( > local type=$(file -b ${i}) > case ${type} in > data) > tar -xJf "./$i" > ;; > gzip*) > tar -xzf "./$i" > ;; > esac > ) || die "Failed to unpack $i" > done > } > I have a couple of questions. Why sub-shell here? My understanding is that first you need to make sure the file exists and then unpack it. Also || die does not work in subshells. http://devmanual.gentoo.org/ebuild-writing/error-handling/index.html > 2) It'd be also nice to detect mojo installers (most of the time, > they're "*-bin" or "*Installer" ELF32 sfx-archives) and pass them to > unpack_zip by default. > Unfortunately, I've no free time ATM, but if it is needed, I can write > prototype for Mojo unpacking. > We can only merge what you show us for review :) -- Regards, Markos Chandras - Gentoo Linux Developer http://dev.gentoo.org/~hwoarang