* Adam D. Barratt <a...@adam-barratt.org.uk>, 2011-06-14, 21:06:
I'd like to upload new version of Sphinx into s-p-u, which fixes
compatibility with jQuery >= 1.4. (Upstream ships a copy of jQuery
1.2.6, but in Debian we use the packaged one, which is 1.4.2 in
squeeze.)
I'm guessing there's no easy way to have the newer jQuery support both
versions of the syntax? (Hey, it can't hurt to ask...)
Hmm, I didn't even think about this possibility, as JavaScript is not my
favourite programming language. But it turns out that in fact it's quite
easy to fix the issue in jQuery; please see the attached patch. (Only
the second file is actually used at build time, but I wanted to keep
them in sync.)
However, I am a bit wary of patching jQuery, because it's definitely
Sphinx is at fault here: the methods that disappeared were clearly
marked as "for internal use only" in the jQuery code.
Also, the patch only does the trick if the documentation was built with
a reasonably recent version of Sphinx. Apparently Sphinx 0.5.x had its
own incompatibilities with jQuery 1.4, which I'm not really willing to
investigate...
There are 55 documentation packages in squeeze affected by this bug.
Unfortunately, the sole upload of Sphinx won't automatically fix them,
as they ship copies of broken javascript code. :(
As I understand it, most of the affected packages are arch:all, so we
can't simply fix the issues via a mass binNMU.
Actually I misread my notes when I was writing the original mail: the
number of affected packages is 65 (55 arch:all + 10 arch:any). However,
upon further inspection I discovered that, due to various packaging bugs,
search function is broken in 48 of them anyway. That leaves us with 15
arch:all packages and 2 binNMUable ones. Two of the arch:all packages
would have to be rebuilt regardless of whether we decide to patch jQuery
or not.
Here are lists of source packages that could be fixed:
arch:all, built with ancient Sphinx (can be fixed only by sourceful
upload):
- argvalidate
- ipython
arch:all, built with recent Sphinx (can be fixed either by sourceful
upload or by patching jQuery):
- ganeti
- libvigraimpex
- mlpy
- nipy
- nipype
- pam-python
- python-apsw
- python-djvulibre
- python-whoosh
- python2.6
- python3.1
- scikit-learn
- update-manager
arch:any, built with recent Sphinx (can be fixed either by binNMU or by
patching jQuery):
- fityk
- pynifti
I don't suppose you fancy no-change-NMUing 55 packages? ;-)
TBH, I was secretly hoping thay you say NACK for updating documentation
packages. ;)
--
Jakub Wilk
--- jquery-1.4.2.orig/src/core.js
+++ jquery-1.4.2/src/core.js
@@ -342,6 +342,13 @@
};
jQuery.extend({
+ className: {
+ // Forward-ported from jQuery 1.2.6 to work around Debian bug #628642
+ has: function( elem, className ) {
+ return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
+ }
+ },
+
noConflict: function( deep ) {
window.$ = _$;
--- jquery-1.4.2.orig/dist/jquery.js
+++ jquery-1.4.2/dist/jquery.js
@@ -359,6 +359,13 @@
};
jQuery.extend({
+ className: {
+ // Forward-ported from jQuery 1.2.6 to work around Debian bug #628642
+ has: function( elem, className ) {
+ return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
+ }
+ },
+
noConflict: function( deep ) {
window.$ = _$;