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 47727138010 for ; Wed, 22 Aug 2012 03:04:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D043BE072C for ; Wed, 22 Aug 2012 03:04:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 51C23E077A for ; Wed, 22 Aug 2012 01:05:30 +0000 (UTC) Received: from mail-gh0-f181.google.com (mail-gh0-f181.google.com [209.85.160.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mattst88) by smtp.gentoo.org (Postfix) with ESMTPSA id 8598333DC82 for ; Wed, 22 Aug 2012 01:05:29 +0000 (UTC) Received: by ghz3 with SMTP id 3so384831ghz.40 for ; Tue, 21 Aug 2012 18:05:27 -0700 (PDT) Received: by 10.50.184.198 with SMTP id ew6mr418865igc.27.1345597527467; Tue, 21 Aug 2012 18:05:27 -0700 (PDT) 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 Received: by 10.50.27.98 with HTTP; Tue, 21 Aug 2012 18:05:05 -0700 (PDT) In-Reply-To: <1345597124-28151-1-git-send-email-sidhayn@gmail.com> References: <1345597124-28151-1-git-send-email-sidhayn@gmail.com> From: Matt Turner Date: Tue, 21 Aug 2012 18:05:05 -0700 Message-ID: Subject: Re: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz To: gentoo-catalyst@lists.gentoo.org Cc: Rick Farina Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: 0b94c7ce-7ec3-407a-aa35-ec0340ec2be7 X-Archives-Hash: 7866f6e520110d2b8729e846e91fddf0 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? It looks like you don't check that the *.tar.bz2 file exists or that the hashing is done.