Package: funkload
Version: 1.13.0-1
Severity: normal
Tags: patch
X-Debbugs-CC: Vincent Férotin <[email protected]>

`fl-install-demo` fails to correctly run, due to a wrong path for demo files.

Running ``fl-install-demo``::

    $ fl-install-demo

fails with this Python traceback::

    Extract FunkLoad examples into ./funkload-demo : ...·
    Traceback (most recent call last):
      File "/usr/bin/fl-install-demo", line 9, in <module>
        load_entry_point('funkload==1.13.0', 'console_scripts',
'fl-install-demo')()
      File "/usr/lib/pymodules/python2.6/funkload/DemoInstaller.py",
line 13, in main
        copytree(cache_path, demo_path)
      File "/usr/lib/python2.6/shutil.py", line 136, in copytree
        names = os.listdir(src)
    OSError: [Errno 2] No such file or directory:
'/usr/lib/pymodules/python2.6/funkload/demo'

This program *should* work, and copy demo files and structure
into new local ``funkload-demo`` directory,
instead of aborting before doing anything.

This problem seems occurring because, in :func:`main` in :mod:`DemoInstaller`,
:data:`cache_path` points to local ``demo`` directory
(i.e. ``/usr/share/pyshared/funkload/demo``),
whereas Debian package puts its content to
``/usr/share/doc/funkload/examples/demo``.

A trivial patch could consist on setting :data:`cache_path` to effective path,
set in a global var (e.g. :data`DEMO_DEBIAN_PATH`)::

    6a7,9
    > DEMO_DEBIAN_PATH = os.path.join("/", "usr", "share", "doc", "funkload",
    >                             "examples", "demo")
    >
    11c14,15
    <     cache_path = resource_filename('funkload', 'demo')
    ---
    >     # cache_path = resource_filename('funkload', 'demo')
    >     cache_path = DEMO_DEBIAN_PATH

Above patch is, well... ugly, but seems to work locally.
I have no idea how doing a better modification,
although I'm quite sure it is possible :-)


In hope it serves,
Vincent Férotin


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages funkload depends on:
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-pkg-resources    0.6.14-4         Package Discovery and Resource Acc
ii  python-support          1.0.10           automated rebuilding support for P
ii  python-webunit          1:1.3.10-1       Unit testing for web apps with cod

Versions of packages funkload recommends:
pn  gnuplot                       <none>     (no description available)
ii  python-docutils               0.7-2      utilities for the documentation  of
ii  tcpwatch-httpproxy            1.3b-3     TCP monitoring and logging tool  wi

funkload suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to