Creating Dummy Packages to Fulfil Dependencies in Debian

20.08.2005 at 22:17

First of all I would like to make clear that this should just be done if you really know what you are doing, otherwise it could badly mess up your system.

Ok, you have been warned. However, in some cases it is really useful. For example I have the proprietary SUN J2SDK (*.bin file) installed on my system, since the JDK is not integrated into the package management system an apt-get install azureus fails because of broken dependencies on sun-j2dk-1.5.

So I decided to set up a dummy package to pretend that sun-j2dk-1.5 is installed. First we need to create a control file.

equivs-control my-j2sdk1.5

This will generate a template control file which can be edited to fit our needs.

Section: misc
Priority: optional
Standards-Version: 3.5.10

Package: my-j2sdk1.5
Provides: sun-j2sdk1.5
Architecture: all

Description: Dummy package whose only purpose is to provide sun-j2sdk1.5

Now the next step is to build an actual deb package.

equivs-build my-j2sdk1.5

This file can now be installed as usual.

dpkg -i my-j2sdk1.5

Java packages can now also be installed normally because the Java SDK is registered in the system's package database.

Comments (1)

Useful for docker images

13.06.2018 by mviereck

Thank you! I use this to shrink down docker image sizes. Some dependencies are quite useless within a container environment, now I can replace them with dummy packages.

1