I am trying to create a deb package of programX.Y, it is possible that in the destine system exist the same program but other version (programX.Z) if I generate a deb pacakge with:
dpkg-buildpackage -us -uc --source-option=--include-binaries --source-option=-isession
When I try to install the pacakge in a system that has other version of program (programX.Z) I get:
dpkg: error processing programX.Y.deb (--install): trying to overwrite `/usr/lib/XXX', which is also in package programX.Z
I know if I pass --force-overwrite I solve the problem, but I don't want that solution.
The question is how can I create a deb package of a program version that could be install in the system and force overwriting automatically. An example could be python. Python3 has many versions (3.1, 3.2, 3.3, 3.4, 3.5...). I want install my custom python package version 3.6 in system that has installed python3.4.
It is possible?