Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Rick Farina <sidhayn@×××××.com>
Subject: Re: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz
Date: Wed, 22 Aug 2012 03:04:28
Message-Id: CAEdQ38F7wJUhYybDyFb2XgaTTbnc0=y-0p4HY9UQcxmEB5vP+Q@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz by Rick Farina
1 On Tue, Aug 21, 2012 at 5:58 PM, Rick Farina <sidhayn@×××××.com> wrote:
2 > This patch adds in support for automatically detecting and decompressing
3 > both formats gentoo currently ships portage snapshots in. To make the
4 > change as minimal as possible I am using recent gnu tar ability to
5 > automatically pick the correct format and decompress. This may not work
6 > as expected on *bsd or MacOSX unless we already require gnu tar on those
7 > platforms.
8 >
9 > Signed-off-by: Rick Farina <sidhayn@×××××.com>
10 > ---
11 > modules/generic_stage_target.py | 13 ++++++++-----
12 > 1 files changed, 8 insertions(+), 5 deletions(-)
13 >
14 > diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
15 > index c4ef239..031d8bf 100644
16 > --- a/modules/generic_stage_target.py
17 > +++ b/modules/generic_stage_target.py
18 > @@ -404,12 +404,15 @@ class generic_stage_target(generic_target):
19 >
20 > def set_snapshot_path(self):
21 > self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
22 > - "/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
23 > + "/snapshots/portage-"+self.settings["snapshot"]+".tar.xz")
24 >
25 > if os.path.exists(self.settings["snapshot_path"]):
26 > self.settings["snapshot_path_hash"]=\
27 > generate_hash(self.settings["snapshot_path"],\
28 > hash_function=self.settings["hash_function"],verbose=False)
29 > + else:
30 > + self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
31 > + "/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
32 >
33 > def set_snapcache_path(self):
34 > if self.settings.has_key("SNAPCACHE"):
35
36 This bit looks for *.tar.xz and then falls back to *.tar.bz2?
37
38 It looks like you don't check that the *.tar.bz2 file exists or that
39 the hashing is done.

Replies

Subject Author
Re: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz Richard Farina <sidhayn@×××××.com>