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 EF25A138010 for ; Wed, 22 Aug 2012 03:03:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84AAFE0730 for ; Wed, 22 Aug 2012 03:03:55 +0000 (UTC) Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com [209.85.160.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 26716E075C for ; Wed, 22 Aug 2012 00:58:35 +0000 (UTC) Received: by ghz3 with SMTP id 3so381906ghz.40 for ; Tue, 21 Aug 2012 17:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=ABk45OI+GazNt1aunnlx9ycpQX5BpBrbHfz58EQoEe8=; b=Ktop0cUB+DuwDbQnPMj/gB/NVzR2YsMB3X/x+Mef/7p9bcN9t/dKSDjxYlLBHNRSvT 6WM27uR8f4offrfG6HIKGZuQwz2tDzbyThyCyJ+FHWwTsMysNEMU9cPiIw3yBvwfs/ce a26aSRWjaQo09w6kFmocx4KhqErFHa3iNDMugAMvuyDB+TvA/p1tZekP56XcARTgIpFR ivPwT1WZ9lJ4U9g5Z4TEM3AiNxXdScyyXW77uD8bO9TXF9P8nyxq8lkEX0C8IWHjA7++ HYJo6u1v5nzIIRQANC8LGSTwnpfcAk8nkp9Nv4KlS8A5GI7nTgT1M0izvR5LRXGKwTNA GNFA== Received: by 10.50.47.162 with SMTP id e2mr406999ign.23.1345597115286; Tue, 21 Aug 2012 17:58:35 -0700 (PDT) Received: from [192.168.107.2] (239.sub-75-201-224.myvzw.com. [75.201.224.239]) by mx.google.com with ESMTPS id ul4sm17383100igb.15.2012.08.21.17.58.33 (version=SSLv3 cipher=OTHER); Tue, 21 Aug 2012 17:58:34 -0700 (PDT) Message-ID: <50342F36.1090304@gmail.com> Date: Tue, 21 Aug 2012 21:00:38 -0400 From: Richard Farina User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120815 Thunderbird/14.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] Re: [PATCH] Support snapshot.tar.xz References: <1345597124-28151-1-git-send-email-sidhayn@gmail.com> In-Reply-To: <1345597124-28151-1-git-send-email-sidhayn@gmail.com> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 88bc87b7-7cc3-4e0c-b93f-babac0a7cc23 X-Archives-Hash: 95f2c280b30ed61c550561f24ce71a51 Is the gnu tar requirement too much? I can rewrite it without but this way is just so clean... Thanks, Zero On 08/21/2012 08:58 PM, Rick Farina wrote: > This patch adds in support for automatically detecting and decompressing > both formats gentoo currently ships portage snapshots in. To make the > change as minimal as possible I am using recent gnu tar ability to > automatically pick the correct format and decompress. This may not work > as expected on *bsd or MacOSX unless we already require gnu tar on those > platforms. > > Signed-off-by: Rick Farina > --- > modules/generic_stage_target.py | 13 ++++++++----- > 1 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py > index c4ef239..031d8bf 100644 > --- a/modules/generic_stage_target.py > +++ b/modules/generic_stage_target.py > @@ -404,12 +404,15 @@ class generic_stage_target(generic_target): > > def set_snapshot_path(self): > self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\ > - "/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2") > + "/snapshots/portage-"+self.settings["snapshot"]+".tar.xz") > > if os.path.exists(self.settings["snapshot_path"]): > self.settings["snapshot_path_hash"]=\ > generate_hash(self.settings["snapshot_path"],\ > hash_function=self.settings["hash_function"],verbose=False) > + else: > + self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\ > + "/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2") > > def set_snapcache_path(self): > if self.settings.has_key("SNAPCACHE"): > @@ -635,7 +638,7 @@ class generic_stage_target(generic_target): > self.settings["source_path"]+"\nto "+\ > self.settings["chroot_path"]+\ > " (This may take some time) ...\n" > - unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+\ > + unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\ > self.settings["chroot_path"] > error_msg="Tarball extraction of "+\ > self.settings["source_path"]+" to "+\ > @@ -646,7 +649,7 @@ class generic_stage_target(generic_target): > self.settings["source_path"]+"\nto "+\ > self.settings["chroot_path"]+\ > " (This may take some time) ...\n" > - unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+\ > + unpack_cmd="tar xpf "+self.settings["source_path"]+" -C "+\ > self.settings["chroot_path"] > error_msg="Tarball extraction of "+self.settings["source_path"]+\ > " to "+self.settings["chroot_path"]+" failed." > @@ -744,7 +747,7 @@ class generic_stage_target(generic_target): > read_from_clst(self.settings["snapshot_cache_path"]+\ > "catalyst-hash") > destdir=self.settings["snapshot_cache_path"] > - unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+destdir > + unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir > unpack_errmsg="Error unpacking snapshot" > cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\ > self.settings["snapshot_cache_path"]+\ > @@ -760,7 +763,7 @@ class generic_stage_target(generic_target): > cleanup_errmsg="Error removing existing snapshot directory." > cleanup_msg=\ > "Cleaning up existing portage tree (This can take a long time)..." > - unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+\ > + unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\ > self.settings["chroot_path"]+"/usr" > unpack_errmsg="Error unpacking snapshot" > >