diff options
author | Ajay Garg <ajay@activitycentral.com> | 2013-02-28 15:05:57 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2013-02-28 15:05:57 (GMT) |
commit | f7034bf1c8ac056a92b8ad4c69f0c9c0438c6da2 (patch) | |
tree | 3d53bf074ecc51a96e9d925a5f5d28f419bce66e |
Initial commit.
-rw-r--r-- | do_it_all.sh | 23 | ||||
-rw-r--r-- | patches/0001-sdxo-3215-Revert-back-to-the-earlier-behaviour-of-re.patch | 61 |
2 files changed, 84 insertions, 0 deletions
diff --git a/do_it_all.sh b/do_it_all.sh new file mode 100644 index 0000000..111049a --- /dev/null +++ b/do_it_all.sh @@ -0,0 +1,23 @@ +set -e + +git_url="git://git.sugarlabs.org/read/mainline.git" + + +# Remove the upstream cloned-directory, if any. +if [ -d "activity" ]; then + sudo rm -r activity +fi + +# Clone a fresh copy of the upstream. +git clone "$git_url" activity + +# Build the activity (to generate "generated" files such as locale files). +cd activity +python setup.py build + +# Now, apply the AC patches. +git am ../patches/*.patch + +# Finally, build the bundle (to be retrieved from "activity/dist"). +python setup.py dist_xo + diff --git a/patches/0001-sdxo-3215-Revert-back-to-the-earlier-behaviour-of-re.patch b/patches/0001-sdxo-3215-Revert-back-to-the-earlier-behaviour-of-re.patch new file mode 100644 index 0000000..89f2445 --- /dev/null +++ b/patches/0001-sdxo-3215-Revert-back-to-the-earlier-behaviour-of-re.patch @@ -0,0 +1,61 @@ +From e2dd7282e818c86e0f40d9fc898da769573daa9d Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajay@activitycentral.com> +Date: Thu, 28 Feb 2013 13:07:36 +0530 +Subject: [PATCH] sdxo#3215: Revert back to the earlier behaviour, of re-computing filehash every time when needed. +Organization: Sugar Labs Foundation +Signed-off-by: Ajay Garg <ajay@activitycentral.com> +--- + +This reverts commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e. + +Thankfully, we do not lose anything, as the commit 21af7cc988320c8a53c946253d52fe1bb6ff9a7e was just an "optimisation"-commit; +we don't lose anything on the frontend/backend/anywhere :) + + activity/activity.info | 2 +- + readactivity.py | 10 ++-------- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/activity/activity.info b/activity/activity.info +index 1f2fe88..0c48264 100644 +--- a/activity/activity.info ++++ b/activity/activity.info +@@ -4,7 +4,7 @@ bundle_id = org.laptop.sugar.ReadActivity + icon = activity-read + exec = sugar-activity readactivity.ReadActivity + show_launcher = no +-activity_version = 105 ++activity_version = 106.1 + mime_types = application/pdf;image/vnd.djvu;image/x.djvu;image/tiff;application/epub+zip;text/plain;application/zip + license = GPLv2+ + summary = Use this activity when you are ready to read! Remember to flip your computer around to feel like you are really holding a book! +diff --git a/readactivity.py b/readactivity.py +index beed2b4..e0f0cf8 100644 +--- a/readactivity.py ++++ b/readactivity.py +@@ -710,7 +710,6 @@ class ReadActivity(activity.Activity): + self.metadata['Read_search'] = \ + self._edit_toolbar._search_entry.props.text + self.metadata['activity'] = self.get_bundle_id() +- self.metadata['filehash'] = self.filehash + + os.link(self._tempfile, file_path) + +@@ -856,13 +855,8 @@ class ReadActivity(activity.Activity): + self._view_toolbar.set_view(self._view) + self._edit_toolbar.set_view(self._view) + +- +- self.filehash = self.metadata.get('filehash', None) +- if self.filehash is None: +- self.filehash = get_md5(filepath) +- logging.error('Calculate hash %s', self.filehash) +- +- self._bookmarkmanager = BookmarkManager(self.filehash) ++ filehash = get_md5(filepath) ++ self._bookmarkmanager = BookmarkManager(filehash) + self._bookmarkmanager.connect('added_bookmark', + self._added_bookmark_cb) + self._bookmarkmanager.connect('removed_bookmark', +-- +1.7.11.7 + |