[Python-apps-team] Bug#645231: trac: python upgrade leads to inaccessible jquery.js

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Oct 13 17:38:24 UTC 2011


Package: trac
Version: 0.11.7-4
Severity: normal

I upgraded a system from lenny to squeeze.  trac got upgraded (15:35) before
python was upgraded (15:44).

/var/lib/dpkg/info/trac.postinst contains this section for publishing
jquery.js:

# create link(s), even if original file does not exist (yet)
for d in /usr/share/pyshared/trac/htdocs/js \
        /usr/lib/python*/*-packages/trac/htdocs/js; do
    cd $d
    ln -sf /usr/share/javascript/jquery/jquery.min.js jquery.js
done

but because python was upgraded after trac,
/usr/lib/python2.6/dist-packages/trac/htdocs/js didn't exist during
the invocation of this postinstall script.

As a result, a request for
https://trac.example.org/chrome/common/js/jquery.js would cause trac
to look for /usr/lib/python2.6/dist-packages/trac/htdocs/js/jquery.js,
and fail, returning a 404 Not Found.

I worked around the problem by creating the symlink by hand.

It can also probably be worked around by doing an "apt-get install
--reinstall trac" or anything else that will trigger re-invocation of
the postinst script.

I'm not sure what the right way to really fix the problem is, but i
thought this problem ought to be documented so that other people who
run into it can find the workarounds at least.

Thanks for packaging trac for debian, and for relying on the system
copy of jquery rather than on an embedded code copy.

Regards,

    --dkg

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-vserver-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages trac depends on:
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-central          0.6.16+nmu1      register and build utility for Pyt
ii  python-genshi           0.6-1            Python XML-based template engine
ii  python-pysqlite2        2.6.0-1          Python interface to SQLite 3
ii  python-setuptools       0.6.14-4         Python Distutils Enhancements (set

Versions of packages trac recommends:
ii  apache2-mpm-worker [ht 2.2.16-6+squeeze4 Apache HTTP Server - high speed th
ii  libjs-jquery           1.4.2-2           JavaScript library for dynamic web
pn  python-pygments | ensc <none>            (no description available)
ii  python-subversion      1.6.12dfsg-6      Python bindings for Subversion
ii  python-tz              2010b-1           Python version of the Olson timezo

Versions of packages trac suggests:
pn  libapache2-mod-wsgi | liba <none>        (no description available)
pn  python-docutils            <none>        (no description available)
pn  python-textile             <none>        (no description available)
pn  trac-accountmanager        <none>        (no description available)
pn  trac-authopenid            <none>        (no description available)
pn  trac-bitten                <none>        (no description available)
pn  trac-bzr                   <none>        (no description available)
pn  trac-customfieldadmin      <none>        (no description available)
pn  trac-email2trac            <none>        (no description available)
pn  trac-git                   <none>        (no description available)
pn  trac-graphviz              <none>        (no description available)
pn  trac-ja-resource           <none>        (no description available)
pn  trac-mastertickets         <none>        (no description available)
pn  trac-mercurial             <none>        (no description available)
pn  trac-spamfilter            <none>        (no description available)
ii  trac-wikiprint             1.6+r5729-1   Make Trac wiki pages printable, ex
pn  trac-wikirename            <none>        (no description available)
ii  trac-wysiwyg               0.2+svn5931-1 WYSIWYG style editor for the Trac 
pn  trac-xmlrpc                <none>        (no description available)

-- no debconf information





More information about the Python-apps-team mailing list