[Sugar-devel] Sugar bundleBuilder
Alan Jhonn Aguiar Schwyn
alanjas at hotmail.com
Sat Mar 2 21:02:58 EST 2013
The .mo not are in git.. But before call this function, the bundlebuildergenerates it: and the list of files have them.
A solution: remove the generate locale and put before the call:
Line 179:- self.builder.build_locale()
def package(self): bundle_zip = zipfile.ZipFile(self.package_path, 'w', zipfile.ZIP_DEFLATED)
for f in self.get_files_in_git(): print 'file:', f bundle_zip.write(os.path.join(self.config.source_dir, f), os.path.join(self.config.bundle_root_dir, f))
+ self.builder.build_locale()
locale_dir = os.path.join(self.config.source_dir, 'locale') locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES) for f in locale_files: bundle_zip.write(os.path.join(locale_dir, f), os.path.join(self.config.bundle_root_dir, 'locale', f))
bundle_zip.close()
Date: Sat, 2 Mar 2013 20:25:04 -0300
From: gonzalo at laptop.org
To: alanjas at hotmail.com
CC: sugar-devel at lists.sugarlabs.org
Subject: Re: [Sugar-devel] Sugar bundleBuilder
The .mo and the .linfo files should not be in git anyway, right?
Gonzalo
On Sat, Mar 2, 2013 at 12:04 AM, Alan Jhonn Aguiar Schwyn <alanjas at hotmail.com> wrote:
Hi,
I found a problem with bundlebuilder (sugar-toolkit) when use "dist_xo" outof git. The locale folder adds twice times the same .mo and the same .linfo.
The problem is easy solved, but exist some ways.Basically: when execute the command, the .po are compiled. After, whenno git -> use list_files function (that returns all files including the locale
folder files).In the package function, the files of get_files_in_git are add to the .zipAfter, the locale files are again added:
def package(self): bundle_zip = zipfile.ZipFile(self.package_path, 'w',
zipfile.ZIP_DEFLATED)
for f in self.get_files_in_git(): bundle_zip.write(os.path.join(self.config.source_dir, f),
os.path.join(self.config.bundle_root_dir, f)) locale_dir = os.path.join(self.config.source_dir, 'locale') locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)
for f in locale_files: bundle_zip.write(os.path.join(locale_dir, f), os.path.join(self.config.bundle_root_dir, 'locale', f))
I have installed "python-sugar-toolkit-0.96".Some .XO can have bigger size due to this issue.
Regards!
Alan
_______________________________________________
Sugar-devel mailing list
Sugar-devel at lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
_______________________________________________
Sugar-devel mailing list
Sugar-devel at lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130303/cd8522fe/attachment.html>
More information about the Sugar-devel
mailing list