Python documentation search does not work

Bug #1001585 reported by Urs Fleisch on 2012-05-19
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python2.7 (Ubuntu)
Undecided
Unassigned
Precise
Medium
Unassigned

Bug Description

How to reproduce:
Open in a browser: file:///usr/share/doc/python/html/search.html?q=unittest, no search results are displayed.

How to fix:
The link target /usr/share/doc/python/html/_static/underscore.js -> ../../../../javascript/underscore/jquery.js does not exist, it should point to ../../../../javascript/underscore/underscore.js. /usr/share/javascript/underscore/underscore.js is contained in package libjs-underscore, so python2.7-doc should have a dependency to that package.

Here is a patch:
diff -ru python2.7-2.7.3.orig/debian/control python2.7-2.7.3/debian/control
--- python2.7-2.7.3.orig/debian/control 2012-05-19 12:06:55.000000000 +0200
+++ python2.7-2.7.3/debian/control 2012-05-19 12:08:38.119482966 +0200
@@ -93,7 +93,7 @@
 Package: python2.7-doc
 Section: doc
 Architecture: all
-Depends: libjs-jquery, ${misc:Depends}
+Depends: libjs-jquery, libjs-underscore, ${misc:Depends}
 Suggests: python2.7
 Description: Documentation for the high-level object-oriented language Python (v2.7)
  These is the official set of documentation for the interactive high-level
diff -ru python2.7-2.7.3.orig/debian/rules python2.7-2.7.3/debian/rules
--- python2.7-2.7.3.orig/debian/rules 2012-05-19 12:06:55.000000000 +0200
+++ python2.7-2.7.3/debian/rules 2012-05-19 12:10:39.024082495 +0200
@@ -964,7 +964,7 @@
    /usr/share/doc/$(p_doc)/html \
   /usr/share/javascript/jquery/jquery.js \
    /usr/share/doc/$(p_base)/html/_static/jquery.js \
- /usr/share/javascript/underscore/jquery.js \
+ /usr/share/javascript/underscore/underscore.js \
    /usr/share/doc/$(p_base)/html/_static/underscore.js

  : # devhelp docs

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python2.7 (Ubuntu):
status: New → Confirmed

The attachment "Fix link to underscore.js used to search in Python documentation" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Matthias Klose (doko) wrote :

this is fixed in quantal

Changed in python2.7 (Ubuntu):
status: Confirmed → Fix Released
Changed in python2.7 (Ubuntu Precise):
status: New → Triaged
milestone: none → precise-updates
Dmitry Shachnev (mitya57) wrote :

Thanks for looking at this bug.

I still see this in http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/python2.7/quantal/view/head:/debian/rules:

> /usr/share/javascript/underscore/jquery.js \
> /usr/share/doc/$(p_base)/html/_static/underscore.js

Is it really fixed? BTW, is there any reason for not using dh_sphinxdoc (which does all such linking automatically)?

Dmitry Shachnev (mitya57) wrote :

Now this is really fixed in quantal.

Tyler Wagner (tyler) wrote :

Quick solution for precise users:

sudo apt-get install libjs-underscore
sudo ln -s /usr/share/javascript/underscore/underscore.min.js /usr/share/javascript/underscore/jquery.js

Tyler Wagner (tyler) wrote :

Lines cut off. Attempt #2 for quick solution for precise users:

sudo apt-get install libjs-underscore
sudo ln -s /usr/share/javascript/underscore/underscore.min.js \
/usr/share/javascript/underscore/jquery.js

Changed in python2.7 (Ubuntu Precise):
importance: Undecided → Medium
Gao Shichao (xgdgsc) wrote :

Please fix for precise.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers