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 45836138010 for ; Wed, 22 Aug 2012 03:04:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27A19E06F7 for ; Wed, 22 Aug 2012 03:04:55 +0000 (UTC) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) by pigeon.gentoo.org (Postfix) with ESMTP id D7158E0774 for ; Wed, 22 Aug 2012 01:36:21 +0000 (UTC) Received: by iagw33 with SMTP id w33so387789iag.40 for ; Tue, 21 Aug 2012 18:36:21 -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:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=7P89K2sEdOlE/fikzyy0mScacAdhb8zSPPXr/4jTdD4=; b=FktcaLN7oYid1/fx30LiusmsOL6MoQubwB2g8SznCPuErGwyRnqpQvbbaGyPjWngV4 q6yHJx/IguTjHuCU6mkWWOQfRwKTlqJLvLtkDNZkxNSCdsmEpHKvfNQAxKvKcbYDoqTa DUCgUoFmx0UAPuIU1qWKSoY/DxO61VvJY6/NDbeV6HQhdhnHq7N9PHt2KQm71X3KHLnL mzAte75GYx0DzjvvSaISt8mq96M78XeqUDtXtmmoJPFF/rKy7+0gJPzydo0adtdZiMQZ SfO/HfLxhI2MVosrX7BuC+8WeBl0Edjydt7EmaC39nrgN28BEzddEWrN9IZipDyTW70v o6MA== Received: by 10.50.85.166 with SMTP id i6mr398995igz.71.1345599381244; Tue, 21 Aug 2012 18:36:21 -0700 (PDT) Received: from [192.168.107.2] (127.sub-75-201-61.myvzw.com. [75.201.61.127]) by mx.google.com with ESMTPS id d4sm6083252iga.14.2012.08.21.18.36.16 (version=SSLv3 cipher=OTHER); Tue, 21 Aug 2012 18:36:20 -0700 (PDT) Message-ID: <5034380C.1020703@gmail.com> Date: Tue, 21 Aug 2012 21:38:20 -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: Matt Turner CC: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz References: <1345597124-28151-1-git-send-email-sidhayn@gmail.com> In-Reply-To: X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 6c7c8422-2b3a-41c5-925f-f6664ab0a22f X-Archives-Hash: 47adb610f875c9f8a7372a31ceae6435 On 08/21/2012 09:05 PM, Matt Turner wrote: > On Tue, Aug 21, 2012 at 5: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"): > > This bit looks for *.tar.xz and then falls back to *.tar.bz2? yes, .xz is smaller and faster to decompress hence first. > > It looks like you don't check that the *.tar.bz2 file exists or that > the hashing is done. > I forgot to copy and repeat that block, easy fix. I tested and it didn't appear needed for cleanly failing, but I completely miss the hash_function and that obviously is bad. I'll respin on the next flight. Any comments on the gnu tar requirement? is that an issue or is okay? thanks, Zero