[Sugar-devel] safer customization key (was Re: will the one true browse please stand up?)

Daniel Drake dsd at laptop.org
Fri Jul 31 14:23:33 EDT 2009


2009/7/31 Joshua N Pritikin <jpritikin at pobox.com>:
> On Fri, Jul 31, 2009 at 03:52:06PM +0545, Daniel Drake wrote:
>> 2009/7/31 Joshua N Pritikin <jpritikin at pobox.com>:
>> > That was not my experience. Where does the customization key code live
>> > in GIT?
>>
>> Here:
>> http://dev.laptop.org/git/users/mstone/irfs-udebs/tree/src-olpc/init?h=unpack-bundles
>
> Well, I'd feel a lot better if prior to the unzip you added something
> like:
>
>  if ext == '.xo':
>    dest_dir = re.sub(r'\-\d+\.xo$', '', f) + '.activity'
>    shutil.rmtree(join(tgt['.xo'], dest_dir))
>
> I know this does not work as written because the filename can (and often
> does) mismatch unzip's idea of the directory name. Any idea how to get
> directory prefix from the zip?

The customization key has always been sweet and simple like this; I
don't suggest changing it as some deployments rely on this.
Documenting the limitations would be sensible, though. In my opinion
the real solution is moving away from .xo which has outgrown its
original design...

Daniel


More information about the Sugar-devel mailing list