public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Richard Farina <sidhayn@gmail.com>
To: Matt Turner <mattst88@gentoo.org>
Cc: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH] Support snapshot.tar.xz
Date: Tue, 21 Aug 2012 21:38:20 -0400	[thread overview]
Message-ID: <5034380C.1020703@gmail.com> (raw)
In-Reply-To: <CAEdQ38F7wJUhYybDyFb2XgaTTbnc0=y-0p4HY9UQcxmEB5vP+Q@mail.gmail.com>

On 08/21/2012 09:05 PM, Matt Turner wrote:
> On Tue, Aug 21, 2012 at 5:58 PM, Rick Farina <sidhayn@gmail.com> 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 <sidhayn@gmail.com>
>> ---
>>  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


  reply	other threads:[~2012-08-22  3:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22  0:58 [gentoo-catalyst] [PATCH] Support snapshot.tar.xz Rick Farina
2012-08-22  1:00 ` [gentoo-catalyst] " Richard Farina
2012-08-22  1:05 ` [gentoo-catalyst] " Matt Turner
2012-08-22  1:38   ` Richard Farina [this message]
2012-08-22 16:27     ` Matt Turner
2012-08-22 16:31       ` Richard Farina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5034380C.1020703@gmail.com \
    --to=sidhayn@gmail.com \
    --cc=gentoo-catalyst@lists.gentoo.org \
    --cc=mattst88@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox