[sugar] [PATCH] Bundlebuilder use manifest, fix_manifest function

Jameson "Chema" Quinn jquinn
Sat Jun 7 21:51:34 EDT 2008


Sorry, Marco, but here is yet another version of the patch. I decided to
refactor the Config class out of bundlebuilder - all it was carrying in the
common start() case was bundle_name; and as for other cases, it is simpler
to call Builder(...params...) than Builder(Config(...params...)).

In the process, I cleaned up the config initialization a bit. Most
significantly, I am now picking up bundle_name from ActivityBundle, which
gets it from activity.info, so that is no longer a meaningful parameter to
have to pass. (I strip whitespace from activity_name to get bundle_name).

And I have fixed the two leftover pylint complaints.

There are a few more changes I want to make (a few extra cmd_xxx functions
for convenience), but I'll let you OK this first.

bundleManifest.all.patch = (bundleMANIFEST.patch /*included above*/ +
bundleManifest.sub.patch)

Cheers,
Jameson

On Sat, Jun 7, 2008 at 10:24 AM, Jameson Chema Quinn <jquinn at cs.oberlin.edu>
wrote:

> I'm away from my machine, but quick response, I'll say more later.
>
>
> On Sat, Jun 7, 2008 at 6:51 AM, Marco Pesenti Gritti <mpgritti at gmail.com>
> wrote:
>
>> I'm still getting a few pylint errors, you don't?.
>
>
> I was just getting "defined outside of __init__" for
> ActivityBundle.manifest ... I don't know how I'm supposed to fix that, since
> it is defined from a subroutine of __init__ that is also useful elsewhere.
>
>
>> Also can you please
>> answer the question/notes I posted before I go ahead an do a full
>> review?
>
>
> OK, here:
>
> * Please run pylint on the changed files. You can use
> sugar-jhbuild/scripts/data
>>
>> /pylintrc. That will catch several problems
>> and nitpicks that I'd ask you to fix anyway.
>
>
> Done, I think, I will check again later.
>
>>
>> * I dont understand all the
>> warnings.warn(MalformedBundleException(...)). What's the purpose of
>> those. Shouldn't they be real exceptions? What's the advantage of
>> using the warnings module over logging.warning?
>
>
> fixed in the patch I reposted
>
>
> * I'm not sure what you are using dest_dir for, but it looks like it
> should be part of Config.
>
> again, fixed.
>
> * Why are you moving the activity and env imports inline.
>
> I answered that in my previous email: to make it easier to use these files
> without having the rest of Sugar installed.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20080607/82484ae0/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bundleMANIFEST.subpatch
Type: application/octet-stream
Size: 12033 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080607/82484ae0/attachment-0001.obj 



More information about the Sugar-devel mailing list