I have created a custom packages using dpkg --build . In the DEBIAN dir I have placed all the required files for package installation namely control,preinst,postinst,prerm etc.
When I try to install the package I would like to check whether the same package is installed or not . If it is installed I would like to abort package installation.
I have tried using Conflicts as well as Breaks rules in control file but to no avail. Here is a documentation which suggests that it is not possible with the help of Conflicts & Breaks tag names.
A special exception is made for packages which declare that they break their own package name or a virtual package which they provide (see below): this does not count as a real breakage.
A special exception is made for packages which declare a conflict with their own package name, or with a virtual package which they provide (see below): this does not prevent their installation, and allows a package to conflict with others providing a replacement for it.
If any one knows how to do it it would be of real help .