Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452152 - net-analyzer/linkchecker: depends on dev-python/pysqlite but not on python*[sqlite]
Summary: net-analyzer/linkchecker: depends on dev-python/pysqlite but not on python*[s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Justin Lecher (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 452122
  Show dependency tree
 
Reported: 2013-01-14 22:06 UTC by Michał Górny
Modified: 2013-01-16 11:49 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-14 22:06:00 UTC
The package does depend on dev-python/pysqlite:2 but not on Python implementation USE=sqlite.

The pysqlite package is no longer maintained and compatible with Python 2 only; while the builtin 'sqlite3' module is basically a maintained clone/fork of pysqlite.

If the package actually imports pysqlite2 unconditionally, please check whether it wouldn't work with the builtin 'sqlite3' module as well. If it does, upstream should probably fix the package to import 'sqlite3' *at least* when 'pysqlite2' is not available. If it doesn't, please let us know and we will know that pysqlite needs to be kept in the tree.

If the package simply supports 'sqlite3', please let us know or update the deps. However, the latter is unnecessary since the 'old' Python eclass doesn't provide a proper way to do this, and we may decide to drop pysqlite entirely after getting feedback for the packages depending on it.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2013-01-15 11:35:13 UTC
README says it is need but I can't see it is being used. What do you say?

linkcheck/configuration/__init__.py:    ("sqlite3", u"Sqlite"),
linkcheck/bookmarks/firefox.py:    import sqlite3
linkcheck/bookmarks/firefox.py:    has_sqlite = True
linkcheck/bookmarks/firefox.py:    has_sqlite = False
linkcheck/bookmarks/firefox.py:extension = re.compile(r'/(?i)places.sqlite$')
linkcheck/bookmarks/firefox.py:    """Return the first found places.sqlite file of the profile directories
linkcheck/bookmarks/firefox.py:                fname = os.path.join(dirname, "places.sqlite")
linkcheck/bookmarks/firefox.py:    Returns None if sqlite3 module is not installed.
linkcheck/bookmarks/firefox.py:    if not has_sqlite:
linkcheck/bookmarks/firefox.py:    conn = sqlite3.connect(filename, timeout=0.5)
linkcheck/checker/fileurl.py:        if firefox.has_sqlite and firefox.extension.search(self.url):
linkcheck/checker/fileurl.py:        elif firefox.has_sqlite and firefox.extension.search(self.url):
linkcheck/checker/const.py:# firefox bookmark file needs sqlite3 for parsing
linkcheck/checker/const.py:    import sqlite3
linkcheck/checker/const.py:    ExcCacheList.append(sqlite3.Error)
MANIFEST.in:recursive-include tests *.py *.result *.html *.ico *.txt *.zip *.asc *.css *.xhtml *.sqlite *.adr *.swf
setup.py:    # add PyQt4.QtSql so that sqlite needed by QHelpCollection works
setup.py:    # Copy needed sqlite plugin files to distribution directory.
setup.py:    add_qt_plugin_file(files, plugin_dir, "sqldrivers", "%sqsqlite%s" % args)
"%sqsqlite%s" % args)
tests/checker/test_bookmarks.py:        self.file_test("places.sqlite")
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-15 15:38:36 UTC
Well, looking at the code, my guess would be that they removed pysqlite2 dep when they added Python 3 support.

doc/python3.txt:TODO Python Sqlite from https://code.google.com/p/pysqlite/

(the package can't do py3)

For the old python eclass, I think it will be something like:

PYTHON_USE_WITH=sqlite
PYTHON_USE_WITH_OPT=bookmarks

but I might be wrong.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-01-15 16:18:11 UTC
+  15 Jan 2013; Justin Lecher <jlec@gentoo.org> linkchecker-7.9.ebuild,
+  -linkchecker-8.0.ebuild, -linkchecker-8.1.ebuild, linkchecker-8.2.ebuild,
+  linkchecker-8.3.ebuild:
+  Drop old; drop pysqlite dep, #452152
+


How do I do it correctly for the new eclasses?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-15 23:27:56 UTC
(In reply to comment #3)
> How do I do it correctly for the new eclasses?

I've already replied you on IRC but I'll restate here for archives :P.

The easy way: IUSE=bookmarks -> IUSE=sqlite, PYTHON_REQ_USE=sqlite?

The hard way: I'll introduce a helper function to generate PYTHON_DEPS with another value of PYTHON_REQ_USE.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2013-01-16 11:49:27 UTC
+  16 Jan 2013; Justin Lecher <jlec@gentoo.org> linkchecker-8.3.ebuild,
+  metadata.xml:
+  Follow Michał Górny's suggestions regarding USE change, #452152
+