• Bug#1099545: hugin-tools: hugin's Python3.12 cache files are not cleare

    From Andreas Metzler@21:1/5 to alexandre.detiste@gmail.com on Wed Mar 5 18:40:01 2025
    On 2025-03-04 Alexandre Detiste <alexandre.detiste@gmail.com> wrote:
    Package: hugin-tools
    Version: 2024.0.1+dfsg-1+b1
    Severity: normal

    Dear Maintainer,

    I've notice that the upgrade of Python to 3.13
    and removal of Python 3.12 will left two Python 3.12 cache files behind
    in /usr/share/hugin/data/plugins-templates/__pycache__/

    Greetings

    Alexandre


    root@antec:~# cruft | grep -v debputy
    cruft report: mar 04 mar 2025 21:22:45
    ---- missing: dpkg ----
    ---- unexplained: / ----
    /usr/share/hugin/data/plugins-templates/__pycache__/dual_use.cpython-312.pyc
    /usr/share/hugin/data/plugins-templates/__pycache__/plugin_skeleton.cpython-312.pyc

    end.

    root@antec:~# ls /usr/share/hugin/data/plugins-templates/__pycache__/ -l total 16
    -rw-r--r-- 1 root root 2187 21 déc 14:25 dual_use.cpython-312.pyc
    -rw-r--r-- 1 root root 2189 3 fév 14:59 dual_use.cpython-313.pyc
    -rw-r--r-- 1 root root 571 21 déc 14:25 plugin_skeleton.cpython-312.pyc -rw-r--r-- 1 root root 573 3 fév 14:59 plugin_skeleton.cpython-313.pyc
    [...]

    Hello,

    The py-files for both of these are part of hugin-data (a dependency of hugin-tools). Are the python cache files removed when uninstalling
    _this_ package?

    cu Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From stefanor@debian.org@21:1/5 to All on Mon Mar 10 13:30:01 2025
    Hi Alexandre (2025.03.10_10:32:28_+0000)
    Maybe can Stefano answer help you.

    Greetings

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1099543#15

    If you install modules to a private path like that, you should install
    an rtupdate script in /usr/share/python3/runtime.d/ that calls py3clean
    and py3compile.

    That message was in the context of debputy, an alternative to
    debhhelper.

    hugin looks like uses standard package tooling, so you just need to
    specify /usr/share/hugin/data/ as a private module path to dh_python3.

    Stefano

    --
    Stefano Rivera
    http://tumbleweed.org.za/
    +1 415 683 3272

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Metzler@21:1/5 to stefanor@debian.org on Mon Mar 10 18:30:01 2025
    On 2025-03-10 stefanor@debian.org wrote:
    Hi Alexandre (2025.03.10_10:32:28_+0000)
    Maybe can Stefano answer help you.

    Greetings

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1099543#15

    If you install modules to a private path like that, you should install
    an rtupdate script in /usr/share/python3/runtime.d/ that calls py3clean and py3compile.

    That message was in the context of debputy, an alternative to debhhelper.

    hugin looks like uses standard package tooling, so you just need to specify /usr/share/hugin/data/ as a private module path to dh_python3.
    [...]

    Hello,

    thank you for the hand-holding.

    Hugin already does point dh_python to the respective subdirectory[1] and dh_python adds postinst/prerm scripts to hugin*. The cleanup therefore
    happens when hugin ins uninstalled or upgraded. Alexandre would like to
    have the cleanup unrelated to hugin upgrade on python-3.12-removal.

    So this sounds like a feature request for dh-python.

    cu Andreas
    [1]
    40 override_dh_python3:
    41 dh_python3 -i /usr/share/hugin/data/plugins
    42 dh_python3 -a
    --
    `What a good friend you are to him, Dr. Maturin. His other friends are
    so grateful to you.'
    `I sew his ears on from time to time, sure'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)