On Fri, 19 May 2023 08:48:46 +0200 Helmut Grohne <hel...@subdivi.de> wrote: > Hi, > > On Thu, May 18, 2023 at 10:30:48PM +0400, Andrey Rakhmatullin wrote: > > Looks like the file in cadabra2, let's say, provides integration between > > it and python3-notebook. > > I'm not sure what you want to achieve here. If this is about two > competing implementations where one is strictly superior to the other, > then maybe dpkg-diverting the lesser one would be reasonable? The > diversion mechanism works entirely without adding a relationship between > the packages. > > Another option is use of update-alternatives, which also allows > specifying a preference on the packaging level while also providing a > user choice. > > I lack the context of the package at hand, so I'll leave that up to you, > but I think there is sufficient options on the table for dealing with it > in a good way. Please choose wisely. >
>From what i see the intended result is not a file replacement but adding a file into codemirror. If everything works well the sequence is that python3-notebook pulls in libjs-codemirror which contains various files in /usr/share/javascript/codemirror/ python3-notebook then ships /usr/lib/python3/dist-packages/notebook/static/components/codemirror as symlink (../../../../../../share/javascript/codemirror aka /usr/lib/share/javascript/codemirror ) pointing to the codemirror library. Now cadabra2 wants to place an additional file (mode/cadabra/cadabra.js) for integration into the codemirror library used by python3-notebook. 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. 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. 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. - Martin