Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
El Mon, 17-05-2010 a las 16:04 +0200, Sascha Silbe escribió: If these activities currently include MANIFEST in git, then yes, they should stop doing so. Please note that I'm talking about git only, not release tarballs or .xo's. What is the current purpose of storing the MANIFEST inside an .xo? Isn't it a mere duplicate of the filenames already listed in the zip index? At least in its current form, this part of the bundle specification sounds disturbingly reminiscent of the MANIFEST file in Java JAR archives, but without any of its original purposefulness. Unless we have imminent plans to make the MANIFEST actually do something useful anytime soon, I'd offer the following flamebait^W code simplification patch: From 07b6cc041fe9a0ecd798ec67e8d27728d33001e3 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti ber...@codewiz.org Date: Thu, 20 May 2010 02:19:14 -0400 Subject: [PATCH] Remove incomplete MANIFEST support Organization: Sugar Labs Foundation This incomplete feature contributes to confuse new activity authors and slightly complicates our bundle installation logic. The day someone finds something useful to do with the MANIFEST specification, we can revert this patch in no time. Signed-off-by: Bernie Innocenti ber...@codewiz.org Tested-by: Bernie Innocenti ber...@codewiz.org --- src/sugar/activity/bundlebuilder.py | 48 ++--- src/sugar/bundle/activitybundle.py | 99 +-- src/sugar/bundle/bundle.py |9 --- 3 files changed, 6 insertions(+), 150 deletions(-) diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py index 868ca3d..630a3e4 100644 --- a/src/sugar/activity/bundlebuilder.py +++ b/src/sugar/activity/bundlebuilder.py @@ -141,37 +141,9 @@ class Builder(object): f.close() def get_files(self): -files = self.config.bundle.get_files() - -if not files: -logging.error('No files found, fixing the MANIFEST.') -self.fix_manifest() -files = self.config.bundle.get_files() - -return files - -def check_manifest(self): -missing_files = [] - allfiles = list_files(self.config.source_dir, IGNORE_DIRS, IGNORE_FILES) -for path in allfiles: -if path not in self.config.bundle.manifest: -missing_files.append(path) - -return missing_files - -def fix_manifest(self): -self.build() - -manifest = self.config.bundle.manifest - -for path in self.check_manifest(): -manifest.append(path) - -f = open(os.path.join(self.config.source_dir, MANIFEST), wb) -for line in manifest: -f.write(line + \n) +return allfiles class Packager(object): @@ -197,13 +169,6 @@ class XOPackager(Packager): bundle_zip = zipfile.ZipFile(self.package_path, 'w', zipfile.ZIP_DEFLATED) -missing_files = self.builder.check_manifest() -if missing_files: -logging.warn('These files are not included in the manifest ' \ - 'and will not be present in the bundle:\n\n' + - '\n'.join(missing_files) + - '\n\nUse fix_manifest if you want to add them.') - for f in self.builder.get_files(): bundle_zip.write(os.path.join(self.config.source_dir, f), os.path.join(self.config.bundle_root_dir, f)) @@ -307,14 +272,11 @@ def cmd_dist_xo(config, args): def cmd_fix_manifest(config, args): -'''Add missing files to the manifest''' +'''Add missing files to the manifest (OBSOLETE)''' -if args: -print 'Usage: %prog fix_manifest' -return - -builder = Builder(config) -builder.fix_manifest() +print WARNING: the fix_manifest command is obsolete +print the MANIFEST file is no longer used in bundles, please remove it +pass def cmd_dist_source(config, args): diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index a1f10b9..11a69e0 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -58,7 +58,6 @@ class ActivityBundle(Bundle): self._tags = None self._activity_version = 0 self._installation_time = os.stat(path).st_mtime -self._manifest = None info_file = self.get_file('activity/activity.info') if info_file is None: @@ -69,74 +68,6 @@ class ActivityBundle(Bundle): if linfo_file: self._parse_linfo(linfo_file) -def _get_manifest(self): -if self._manifest is None: -self._manifest = self._read_manifest() -return self._manifest - -manifest = property(_get_manifest, None, None, -NOTICE: this property is potentially quite slow, so better make sure -that it's not called at
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
As Pippy maintainer I wanted to know what changes do I need to make so that sugar-jhbuild generates the MANIFEST file by executing ./setup.py fix_manifest automatically. I agree that the MANIFEST file shouldn't be included in the repos. To cite an example, it is not present in the Read mainline-repo. Thanks, Anish Mangal On Mon, May 17, 2010 at 7:34 PM, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org wrote: On Mon, May 17, 2010 at 10:52:24PM +1000, James Cameron wrote: On Mon, May 17, 2010 at 11:10:56AM +0200, Sascha Silbe wrote: Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. Therefore remove also from Calculate, Hello World, Moon, Physics, and probably quite a few other activities. If these activities currently include MANIFEST in git, then yes, they should stop doing so. Please note that I'm talking about git only, not release tarballs or .xo's. Sounds like a big change. Why do this? For the same reasons we're doing it for other autogenerated files. They have a tendency to get stale (exactly what we're dealing with here) and/or cause conflicts (see constant python-xklavier build failures [1]). [1] https://buildbot.sugarlabs.org/ CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBCgAGBQJL8U0CAAoJELpz82VMF3DaFWIIAJ0XrQhtvCI6EH4RPJvhV0sB VZJ4MYJ2NRVi7LmGDqZ6yfDL9vxa5qTxsDRe9WBAo/urRr7f58XhRUFz2865ZJkm qCsLRLGQ9nhZVSajQbU4HZMtL0Jjv33plz3FO1s2fNBlFkreEAUJQvFTmOChv5n3 M3韱졩怛蘴ឧᥴ㤇풸၆䚯급ʟ쐣ꉎ嫉췺촯뚷凅➕낌� WL6zczeHqHaSJHGhqHvapiFzel3uz3RfMeRLvboEb8dDwCuaFDVZXZAqRr28Dacj 7WcSN9v06HJB1rkgY7VFQt傝⧖瑣᠗銾ᬠ뒮椹峞镌䲘뭆흂潘= =99T3 -END PGP SIGNATURE- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
On Tue, May 18, 2010 at 1:01 PM, Anish Mangal anishmangal2...@gmail.com wrote: As Pippy maintainer I wanted to know what changes do I need to make so that sugar-jhbuild generates the MANIFEST file by executing ./setup.py fix_manifest automatically. Trying running ./setup.py fix_manifest from within Sugar (using the Terminal). Should just work. If it does not, please provide an error log. -walter I agree that the MANIFEST file shouldn't be included in the repos. To cite an example, it is not present in the Read mainline-repo. Thanks, Anish Mangal On Mon, May 17, 2010 at 7:34 PM, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org wrote: On Mon, May 17, 2010 at 10:52:24PM +1000, James Cameron wrote: On Mon, May 17, 2010 at 11:10:56AM +0200, Sascha Silbe wrote: Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. Therefore remove also from Calculate, Hello World, Moon, Physics, and probably quite a few other activities. If these activities currently include MANIFEST in git, then yes, they should stop doing so. Please note that I'm talking about git only, not release tarballs or .xo's. Sounds like a big change. Why do this? For the same reasons we're doing it for other autogenerated files. They have a tendency to get stale (exactly what we're dealing with here) and/or cause conflicts (see constant python-xklavier build failures [1]). [1] https://buildbot.sugarlabs.org/ CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBCgAGBQJL8U0CAAoJELpz82VMF3DaFWIIAJ0XrQhtvCI6EH4RPJvhV0sB VZJ4MYJ2NRVi7LmGDqZ6yfDL9vxa5qTxsDRe9WBAo/urRr7f58XhRUFz2865ZJkm qCsLRLGQ9nhZVSajQbU4HZMtL0Jjv33plz3FO1s2fNBlFkreEAUJQvFTmOChv5n3 M3韱졩怛蘴ឧᥴ㤇풸၆䚯급ʟ쐣ꉎ嫉췺촯뚷凅➕낌� WL6zczeHqHaSJHGhqHvapiFzel3uz3RfMeRLvboEb8dDwCuaFDVZXZAqRr28Dacj 7WcSN9v06HJB1rkgY7VFQt傝⧖瑣᠗銾ᬠ뒮椹峞镌䲘뭆흂潘= =99T3 -END PGP SIGNATURE- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
Hi, I already have a MANIFEST file generated using the process you mentioned. However, I was wondering whether the MANIFEST should be included in the git repo at all, since it would be best if it were created by sugar-jhbuild dynamically (somehow), the way it is done in the case of Read activity. Best Regards, Anish Mangal On Wed, May 19, 2010 at 2:39 AM, Walter Bender walter.ben...@gmail.com wrote: On Tue, May 18, 2010 at 1:01 PM, Anish Mangal anishmangal2...@gmail.com wrote: As Pippy maintainer I wanted to know what changes do I need to make so that sugar-jhbuild generates the MANIFEST file by executing ./setup.py fix_manifest automatically. Trying running ./setup.py fix_manifest from within Sugar (using the Terminal). Should just work. If it does not, please provide an error log. -walter I agree that the MANIFEST file shouldn't be included in the repos. To cite an example, it is not present in the Read mainline-repo. Thanks, Anish Mangal On Mon, May 17, 2010 at 7:34 PM, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org wrote: On Mon, May 17, 2010 at 10:52:24PM +1000, James Cameron wrote: On Mon, May 17, 2010 at 11:10:56AM +0200, Sascha Silbe wrote: Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. Therefore remove also from Calculate, Hello World, Moon, Physics, and probably quite a few other activities. If these activities currently include MANIFEST in git, then yes, they should stop doing so. Please note that I'm talking about git only, not release tarballs or .xo's. Sounds like a big change. Why do this? For the same reasons we're doing it for other autogenerated files. They have a tendency to get stale (exactly what we're dealing with here) and/or cause conflicts (see constant python-xklavier build failures [1]). [1] https://buildbot.sugarlabs.org/ CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAEBCgAGBQJL8U0CAAoJELpz82VMF3DaFWIIAJ0XrQhtvCI6EH4RPJvhV0sB VZJ4MYJ2NRVi7LmGDqZ6yfDL9vxa5qTxsDRe9WBAo/urRr7f58XhRUFz2865ZJkm qCsLRLGQ9nhZVSajQbU4HZMtL0Jjv33plz3FO1s2fNBlFkreEAUJQvFTmOChv5n3 M3韱졩怛蘴ឧᥴ㤇풸၆䚯급ʟ쐣ꉎ嫉췺촯뚷凅➕낌� WL6zczeHqHaSJHGhqHvapiFzel3uz3RfMeRLvboEb8dDwCuaFDVZXZAqRr28Dacj 7WcSN9v06HJB1rkgY7VFQt傝⧖瑣᠗銾ᬠ뒮椹峞镌䲘뭆흂潘= =99T3 -END PGP SIGNATURE- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
On Sun, May 16, 2010 at 05:25:10PM -0400, Bernie Innocenti wrote: Pippy icons were not listed in the MANIFEST file and thus not being installed. [...] Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: Digital signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
On Mon, May 17, 2010 at 11:10:56AM +0200, Sascha Silbe wrote: Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. Therefore remove also from Calculate, Hello World, Moon, Physics, and probably quite a few other activities. Sounds like a big change. Why do this? -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
On Mon, May 17, 2010 at 10:52:24PM +1000, James Cameron wrote: On Mon, May 17, 2010 at 11:10:56AM +0200, Sascha Silbe wrote: Isn't MANIFEST generated automatically by running ./setup.py fix_manifest? We should remove it from the Pippy git repo and make sure sugar-jhbuild calls fix_manifest. Therefore remove also from Calculate, Hello World, Moon, Physics, and probably quite a few other activities. If these activities currently include MANIFEST in git, then yes, they should stop doing so. Please note that I'm talking about git only, not release tarballs or .xo's. Sounds like a big change. Why do this? For the same reasons we're doing it for other autogenerated files. They have a tendency to get stale (exactly what we're dealing with here) and/or cause conflicts (see constant python-xklavier build failures [1]). [1] https://buildbot.sugarlabs.org/ CU Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: Digital signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Add icons to MANIFEST files
On Sun, May 16, 2010 at 05:25:10PM -0400, Bernie Innocenti wrote: Pippy icons were not listed in the MANIFEST file and thus not being installed. I've also removed a bunch of seemingly useless empty lines from MANIFEST and appended a missing \n to the end of port/style.py. Signed-off-by: Bernie Innocenti ber...@codewiz.org Reviewed-by: James Cameron qu...@laptop.org -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel