[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

code reuse in debian/package.config



Hello all

So happened i'm maintainer of debian packages in my company.
And i have the following situation:
There're several deb packages that using debconf to ask user input during installation, apply initial configuration, etc with:
 * debian/package.config
 * debian/package.preinst
 * debian/package.postinst

Seems quiet simple, until number of packages were grown and i noticed that packageA.configs, pacakgeB...packageZ.config (the same for debian/package.postinsts) script code is 90% same (or atleast VERY similar) code, a lot of same mistakes and bugs because of copy-pastes.

OK, i wrote some shell "library" that covers that 90% code base, created a package (call it libxyz-common-tools with just /usr/share/libxyz/config-tool, without config or pre-postinst - just unpack), let make packageA-packageZ be depends or pre-depends on it.

apt-get install libxyz-common-tools
apt-get install packageA

Everything is OK.

But, when installing packageA without libxyz-common-tools is preinstalled - packageA.config script won' run?

Is there any way to solve the problem?


Best regards​
​Yuri​




Reply to: