Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 440948 - app-misc/anki should depend on dev-lang/python:2.7[sqlite]
Summary: app-misc/anki should depend on dev-lang/python:2.7[sqlite]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-02 13:45 UTC by Francesco Turco
Modified: 2012-11-02 17:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for app-misc/anki-2.0.0-r1 (anki.patch,745 bytes, patch)
2012-11-02 13:47 UTC, Francesco Turco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2012-11-02 13:45:33 UTC
I noted that it is currently possible to install app-misc/anki-2.0.0-r1 without dev-lang/python:2.7 having the sqlite USE flag enabled. But in this way Anki cannot be started:

$ anki
Traceback (most recent call last):
  File "/usr/bin/anki", line 14, in <module>
    import anki, aqt
  File "/usr/lib64/python2.7/site-packages/anki/__init__.py", line 32, in <module>
    from anki.storage import Collection
  File "/usr/lib64/python2.7/site-packages/anki/storage.py", line 8, in <module>
    from anki.db import DB
  File "/usr/lib64/python2.7/site-packages/anki/db.py", line 9, in <module>
    from sqlite3 import dbapi2 as sqlite
ImportError: No module named sqlite3

I'm going to attach a patch for review. Please notice I'm running ~amd64, so I don't know if python:2.6 (or python:2.5) is OK for Anki.

Reproducible: Always
Comment 1 Francesco Turco 2012-11-02 13:47:12 UTC
Created attachment 328074 [details, diff]
Patch for app-misc/anki-2.0.0-r1

If accepted, I think we should rename the ebuild to revision -r2.
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2012-11-02 17:31:52 UTC
(In reply to comment #1)
> Created attachment 328074 [details, diff] [details, diff]
> Patch for app-misc/anki-2.0.0-r1
> 
> If accepted, I think we should rename the ebuild to revision -r2.

Hi, thanks for your report.  Is your tree up-to-date?  We are on anki-2.0.2 by now...
Dependencies on USE flags for python are handled through the python eclass.  See http://www.gentoo.org/proj/en/Python/developersguide.xml
under "Checking USE flags of Python".
Usually for such small fixes like a missing dependency you don't need to attach a patch.  It is faster for me to fix this than download and apply your patch, but thanks anyway!  A revbump is not necessary, the files installed by the ebuild don't change, etc.