Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 671808 Details for
Bug 869440
Bring Anki 2 to Fedora
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
3nd pass of updating anki to 2.0
anki2.diff (text/plain), 13.85 KB, created by
Christian Krause
on 2013-01-03 01:06:41 UTC
(
hide
)
Description:
3nd pass of updating anki to 2.0
Filename:
MIME Type:
Creator:
Christian Krause
Created:
2013-01-03 01:06:41 UTC
Size:
13.85 KB
patch
obsolete
>diff --git a/0001-Fix-aqt-share.py-indentation.patch b/0001-Fix-aqt-share.py-indentation.patch >new file mode 100644 >index 0000000..74e6036 >--- /dev/null >+++ b/0001-Fix-aqt-share.py-indentation.patch >@@ -0,0 +1,184 @@ >+From bad1df3c5cd992722a5b40016c0673470a4aaef9 Mon Sep 17 00:00:00 2001 >+From: Christophe Fergeau <cfergeau@redhat.com> >+Date: Wed, 26 Dec 2012 11:45:33 +0100 >+Subject: [PATCH] Fix aqt/share.py indentation >+ >+--- >+ aqt/share.py | 156 +++++++++++++++++++++++++++++------------------------------ >+ 1 file changed, 78 insertions(+), 78 deletions(-) >+ >+diff --git a/aqt/share.py b/aqt/share.py >+index c5997e3..79772fc 100644 >+--- a/aqt/share.py >++++ b/aqt/share.py >+@@ -1,71 +1,71 @@ >+ # to be moved into libanki >+ >+- def _copyToTmpDeck(self, name="cram.anki", tags="", ids=[]): >+- # fixme: use namedtmp >+- ndir = tempfile.mkdtemp(prefix="anki") >+- path = os.path.join(ndir, name) >+- from anki.exporting import AnkiExporter >+- e = AnkiExporter(self.deck) >+- e.includeMedia = False >+- if tags: >+- e.limitTags = parseTags(tags) >+- if ids: >+- e.limitCardIds = ids >+- path = unicode(path, sys.getfilesystemencoding()) >+- e.exportInto(path) >+- return (e, path) >++def _copyToTmpDeck(self, name="cram.anki", tags="", ids=[]): >++ # fixme: use namedtmp >++ ndir = tempfile.mkdtemp(prefix="anki") >++ path = os.path.join(ndir, name) >++ from anki.exporting import AnkiExporter >++ e = AnkiExporter(self.deck) >++ e.includeMedia = False >++ if tags: >++ e.limitTags = parseTags(tags) >++ if ids: >++ e.limitCardIds = ids >++ path = unicode(path, sys.getfilesystemencoding()) >++ e.exportInto(path) >++ return (e, path) >+ >+- def onShare(self, tags): >+- pwd = os.getcwd() >+- # open tmp deck >+- (e, path) = self._copyToTmpDeck(name="shared.anki", tags=tags) >+- if not e.exportedCards: >+- showInfo(_("No cards matched the provided tags.")) >+- return >+- self.deck.startProgress() >+- self.deck.updateProgress() >+- d = DeckStorage.Deck(path, backup=False) >+- # reset scheduling to defaults >+- d.newCardsPerDay = 20 >+- d.delay0 = 600 >+- d.delay1 = 0 >+- d.delay2 = 0 >+- d.hardIntervalMin = 1.0 >+- d.hardIntervalMax = 1.1 >+- d.midIntervalMin = 3.0 >+- d.midIntervalMax = 5.0 >+- d.easyIntervalMin = 7.0 >+- d.easyIntervalMax = 9.0 >+- d.syncName = None >+- d.setVar("newActive", u"") >+- d.setVar("newInactive", u"") >+- d.setVar("revActive", u"") >+- d.setVar("revInactive", u"") >+- self.deck.updateProgress() >+- # unsuspend cards >+- d.unsuspendCards(d.s.column0("select id from cards where type < 0")) >+- self.deck.updateProgress() >+- d.utcOffset = -2 >+- d.flushMod() >+- d.save() >+- self.deck.updateProgress() >+- # media >+- d.s.statement("update deckVars set value = '' where key = 'mediaURL'") >+- self.deck.updateProgress() >+- d.s.statement("vacuum") >+- self.deck.updateProgress() >+- nnotes = d.noteCount >+- mdir = self.deck.mediaDir() >+- d.close() >+- dir = os.path.dirname(path) >+- zippath = os.path.join(dir, "shared-%d.zip" % time.time()) >+- # zip it up >+- zip = zipfile.ZipFile(zippath, "w", zipfile.ZIP_DEFLATED) >+- zip.writestr("notes", str(nnotes)) >+- zip.writestr("version", str(2)) >+- readmep = os.path.join(dir, "README.html") >+- readme = open(readmep, "w") >+- readme.write('''\ >++def onShare(self, tags): >++ pwd = os.getcwd() >++ # open tmp deck >++ (e, path) = self._copyToTmpDeck(name="shared.anki", tags=tags) >++ if not e.exportedCards: >++ showInfo(_("No cards matched the provided tags.")) >++ return >++ self.deck.startProgress() >++ self.deck.updateProgress() >++ d = DeckStorage.Deck(path, backup=False) >++ # reset scheduling to defaults >++ d.newCardsPerDay = 20 >++ d.delay0 = 600 >++ d.delay1 = 0 >++ d.delay2 = 0 >++ d.hardIntervalMin = 1.0 >++ d.hardIntervalMax = 1.1 >++ d.midIntervalMin = 3.0 >++ d.midIntervalMax = 5.0 >++ d.easyIntervalMin = 7.0 >++ d.easyIntervalMax = 9.0 >++ d.syncName = None >++ d.setVar("newActive", u"") >++ d.setVar("newInactive", u"") >++ d.setVar("revActive", u"") >++ d.setVar("revInactive", u"") >++ self.deck.updateProgress() >++ # unsuspend cards >++ d.unsuspendCards(d.s.column0("select id from cards where type < 0")) >++ self.deck.updateProgress() >++ d.utcOffset = -2 >++ d.flushMod() >++ d.save() >++ self.deck.updateProgress() >++ # media >++ d.s.statement("update deckVars set value = '' where key = 'mediaURL'") >++ self.deck.updateProgress() >++ d.s.statement("vacuum") >++ self.deck.updateProgress() >++ nnotes = d.noteCount >++ mdir = self.deck.mediaDir() >++ d.close() >++ dir = os.path.dirname(path) >++ zippath = os.path.join(dir, "shared-%d.zip" % time.time()) >++ # zip it up >++ zip = zipfile.ZipFile(zippath, "w", zipfile.ZIP_DEFLATED) >++ zip.writestr("notes", str(nnotes)) >++ zip.writestr("version", str(2)) >++ readmep = os.path.join(dir, "README.html") >++ readme = open(readmep, "w") >++ readme.write('''\ >+ <html><body> >+ This is an exported packaged deck created by Anki.<p> >+ >+@@ -74,17 +74,17 @@ To share this deck with other people, upload it to >+ http://ankiweb.net/file/upload</a>, or email >+ it to your friends. >+ </body></html>''') >+- readme.close() >+- zip.write(readmep, "README.html") >+- zip.write(path, "shared.anki") >+- if mdir: >+- for f in os.listdir(mdir): >+- zip.write(os.path.join(mdir, f), >+- os.path.join("shared.media/", f)) >+- os.chdir(pwd) >++ readme.close() >++ zip.write(readmep, "README.html") >++ zip.write(path, "shared.anki") >++ if mdir: >++ for f in os.listdir(mdir): >++ zip.write(os.path.join(mdir, f), >++ os.path.join("shared.media/", f)) >+ os.chdir(pwd) >+- self.deck.updateProgress() >+- zip.close() >+- os.unlink(path) >+- self.deck.finishProgress() >+- self.onOpenPluginFolder(dir) >++ os.chdir(pwd) >++ self.deck.updateProgress() >++ zip.close() >++ os.unlink(path) >++ self.deck.finishProgress() >++ self.onOpenPluginFolder(dir) >+-- >+1.8.0.2 >+ >diff --git a/anki-1.0-noupdate.patch b/anki-1.0-noupdate.patch >deleted file mode 100644 >index 43dc7e5..0000000 >--- a/anki-1.0-noupdate.patch >+++ /dev/null >@@ -1,12 +0,0 @@ >-diff -uNr anki-1.0.old/ankiqt/config.py anki-1.0/ankiqt/config.py >---- anki-1.0.old/ankiqt/config.py 2010-07-21 05:55:21.000000000 +0200 >-+++ anki-1.0/ankiqt/config.py 2010-08-02 21:09:29.000000000 +0200 >-@@ -43,7 +43,7 @@ >- fields = { >- 'addZeroSpace': False, >- 'alternativeTheme': False, >-- 'checkForUpdates': True, >-+ 'checkForUpdates': False, >- 'colourTimes': True, >- 'created': time.time(), >- 'deckBrowserNameLength': 30, >diff --git a/anki-2.0.3-noupdate.patch b/anki-2.0.3-noupdate.patch >new file mode 100644 >index 0000000..b895f94 >--- /dev/null >+++ b/anki-2.0.3-noupdate.patch >@@ -0,0 +1,17 @@ >+diff -uNr anki-2.0.3.old/aqt/profiles.py anki-2.0.3/aqt/profiles.py >+--- anki-2.0.3.old/aqt/profiles.py 2012-09-05 19:24:05.000000000 +0200 >++++ anki-2.0.3/aqt/profiles.py 2012-12-27 19:43:11.369462377 +0100 >+@@ -18,11 +18,11 @@ >+ >+ metaConf = dict( >+ ver=0, >+- updates=True, >++ updates=False, >+ created=intTime(), >+ id=random.randrange(0, 2**63), >+ lastMsg=-1, >+- suppressUpdate=False, >++ suppressUpdate=True, >+ firstRun=True, >+ defaultLang=None, >+ disabledAddons=[], >diff --git a/anki.spec b/anki.spec >index 5e74c21..139dd5a 100644 >--- a/anki.spec >+++ b/anki.spec >@@ -1,27 +1,26 @@ > %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} > > Name: anki >-Version: 1.2.11 >-Release: 2%{?dist} >+Version: 2.0.3 >+Release: 1%{?dist} > Summary: Flashcard program for using space repetition learning > > Group: Amusements/Games >-# the file anki-%%{version}/libanki/anki/features/chinese/unihan.db >-# was created out of Unihan.txt from www.unicode.org (MIT license) >-License: GPLv3+ and MIT >+License: AGPLv3 and MIT and BSD > URL: http://ankisrs.net/ >-Source0: http://anki.googlecode.com/files/%{name}-%{version}.tgz >+Source0: http://ankisrs.net/download/mirror/anki-%{version}.tgz > Source1: anki.svg > > # Config change: don't check for new updates. >-Patch0: anki-1.0-noupdate.patch >-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) >+Patch0: anki-2.0.3-noupdate.patch >+# Fix indentation of aqt/share.py >+Patch1: 0001-Fix-aqt-share.py-indentation.patch > BuildRequires: python2-devel, python-setuptools, python-sqlalchemy > BuildRequires: desktop-file-utils, PyQt4, python-simplejson > Requires: qt4, PyQt4 > Requires: python-sqlalchemy, python-simplejson > Requires: python-matplotlib >-Requires: pygame, python-BeautifulSoup >+Requires: pygame, python-BeautifulSoup, python-httplib2 > Requires: pyaudio, sox > BuildArch: noarch > >@@ -32,26 +31,33 @@ as possible. Anki is based on a theory called spaced repetition. > > %prep > %setup -q >-%patch0 -F 9 -p1 -b .noupdate >-%{__sed} -i -e '/^#!\//, 1d' ankiqt/ui/dropbox.py >+rm -rf libanki/thirdparty >+%patch0 -p1 -b .noupdate >+%patch1 -p1 -b .indent > > %build >-pushd libanki >-%{__python} setup.py build >-popd >- >-%{__python} setup.py build >- > > %install >-rm -rf %{buildroot} >-pushd libanki >-%{__python} setup.py install --skip-build --root %{buildroot} >-popd >+mkdir -p %{buildroot}%{_datadir}/%{name} >+cp -R aqt %{buildroot}%{_datadir}/%{name}/ >+cp -R designer %{buildroot}%{_datadir}/%{name}/ >+mkdir -p %{buildroot}%{_datadir}/%{name}/libanki >+cp -R libanki/anki %{buildroot}%{_datadir}/%{name}/libanki >+ >+install -d %{buildroot}%{_docdir}/%{name}-%{version} >+install -m 644 LICENSE.* %{buildroot}%{_docdir}/%{name}-%{version} >+install -m 644 README* %{buildroot}%{_docdir}/%{name}-%{version} >+install -m 644 ChangeLog.old %{buildroot}%{_docdir}/%{name}-%{version} >+install -m 644 libanki/LICENSE %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE.libanki >+install -m 644 libanki/README %{buildroot}%{_docdir}/%{name}-%{version}/README.libanki >+install -m 644 libanki/ChangeLog.old %{buildroot}%{_docdir}/%{name}-%{version}/ChangeLog.old.libanki >+ >+install -d %{buildroot}%{_bindir} >+install -m 755 anki %{buildroot}%{_bindir} >+ >+install -d %{buildroot}%{_datadir}/mime/packages >+install -m 644 anki.xml %{buildroot}%{_datadir}/mime/packages > >-%{__python} setup.py install --skip-build --root %{buildroot} >- >-install -d %{buildroot}%{_datadir}/applications > desktop-file-install \ > --remove-category=KDE \ > --dir %{buildroot}%{_datadir}/applications \ >@@ -60,50 +66,64 @@ desktop-file-install \ > install -d %{buildroot}%{_datadir}/pixmaps > install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/ > >+install -d %{buildroot}%{_mandir}/man1 >+install -m 644 anki.1 %{buildroot}%{_mandir}/man1/ >+ > find %{buildroot} -type f -o -type l|sed ' > s:'"%{buildroot}"':: >-s:\(.*/lib/python2\..*/site-packages/ankiqt/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: >-s:\(.*/lib/python2\..*/site-packages/anki/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: >+s:\(.*/share/anki/libanki/anki/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: >+s:\(.*/share/anki/aqt/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: >+s:\(.*/share/anki/aqt/locale/qt_\)\([^.]\+\)\(\.qm\):%lang(\2) \1\2\3: > s:^\([^%].*\):: > s:%lang(C) :: > /^$/d' > anki.lang > >+find %{buildroot}/usr/share/anki/aqt/locale -type d|sed ' >+s:'"%{buildroot}"':: >+s:\(.*\):%dir \1:' >>anki.lang > >+find %{buildroot}/usr/share/anki/libanki/anki/locale -type d|sed ' >+s:'"%{buildroot}"':: >+s:\(.*\):%dir \1:' >>anki.lang > >-%clean >-rm -rf %{buildroot} >+%post >+/usr/bin/update-desktop-database &> /dev/null || : >+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : > >+%postun >+/usr/bin/update-desktop-database &> /dev/null || : >+/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : > > %files -f %{name}.lang >-%defattr(-,root,root,-) >-%doc ChangeLog >-%doc COPYING CREDITS README* >-# libankiqt >-%dir %{python_sitelib}/ankiqt >-%{python_sitelib}/ankiqt/*.py* >-%{python_sitelib}/ankiqt/ui >-%{python_sitelib}/ankiqt/forms >- >-# libanki >-%dir %{python_sitelib}/anki >-%{python_sitelib}/anki/*.py* >-%{python_sitelib}/anki/importing >-%{python_sitelib}/anki/template >- >-# locale >-%dir %{python_sitelib}/ankiqt/locale/ >-%dir %{python_sitelib}/ankiqt/locale/* >-%dir %{python_sitelib}/ankiqt/locale/*/LC_MESSAGES >-%dir %{python_sitelib}/anki/locale/ >-%dir %{python_sitelib}/anki/locale/* >-%dir %{python_sitelib}/anki/locale/*/LC_MESSAGES >- >-%{python_sitelib}/*egg-info >+%doc ChangeLog.old* >+%doc LICENSE.* README* >+%dir %{_datadir}/%{name}/ >+%dir %{_datadir}/%{name}/aqt/ >+%{_datadir}/%{name}/aqt/*.py* >+%{_datadir}/%{name}/aqt/forms >+%dir %{_datadir}/%{name}/libanki >+%dir %{_datadir}/%{name}/libanki/anki >+%{_datadir}/%{name}/libanki/anki/*.py* >+%{_datadir}/%{name}/libanki/anki/*.certs >+%{_datadir}/%{name}/libanki/anki/importing >+%{_datadir}/%{name}/libanki/anki/template >+%{_datadir}/%{name}/designer > %{_bindir}/anki > %{_datadir}/applications/%{name}.desktop >-%{_datadir}/pixmaps/%{name}.svg >+%{_datadir}/pixmaps/%{name}.* >+%{_datadir}/mime/packages/anki.xml >+%{_mandir}/man1/%{name}.* > > %changelog >+* Wed Jan 02 2013 Christian Krause <chkr@fedoraproject.org> - 2.0.3-1 >+- Update to anki-2.0.3 (based on work from Christophe Fergeau <cfergeau@redhat.com>) >+- Update license to AGPLv3 >+- Update noupdate patch >+- Add man page >+- Add post/postun scripts (needed for MimeType key in anki.desktop and for >+ /usr/share/mime/packages/anki.xml) >+- Spec file cleanup >+ > * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.11-2 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 869440
:
669204
|
669205
|
669689
|
671808
|
676589