On Fri, May 19, 2023 at 10:27:46AM +0200, Martin Hostettler wrote:
> From what i see the intended result is not a file replacement but adding a
> file into codemirror.

Thank you for stating the goal.

> Currently it does that by using the path
> /usr/lib/python3/dist-packages/notebook/static/components/codemirror/mode/cadabra/cadabra.js
> in data.tar which "works" when python3-notebook was installed previously,
> but is the subject of this bug because when installation order if different
> this does the wrong thing.

Do I understand correctly that all we have to do here is ship the file
in its "canonical" path after resolving the symbolic link from
python3-notebook? In other words, a simple file move in the data.tar?

> So all the ideas of diverts and alternatives seems to be unneeded. What
> seems to be needed is finding the correct way for cadabra2 to always place
> the integration file directly into /usr/lib/share/javascript/codemirror
> without depending on the symlink from python3-notebook that might or might
> not be there.

Sounds super simple and riskfree to me. An ideal solution for this level
of the freeze.

> I have no clue how the correct way to make this switch in the debian
> packaging is, but i hope this messages helps to confirm what is happening
> in this situation and someone with more solid clue about these kind of
> problems in packaging can resolve this.

It is as simple as adding a mv invocation to an
appropriate override_dh_something to debian/rules. That's something that
easily passes an unblock request with the release team.

Probably, appending to override_dh_auto_install is sufficient:

    mv debian/cadabra2/usr/lib/python3/dist-packages/notebook/static/components 
debian/cadabra2/usr/lib/share/javascript
    rmdir debian/cadabra2/usr/lib/python3/dist-packages/notebook/static
    rmdir debian/cadabra2/usr/lib/python3/dist-packages/notebook

This is entirely untested though.

Helmut

Reply via email to