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

Re: code reuse in debian/package.config



because 'apt-get install packageA' should pick up and install all its dependencies automatically

2014-12-29 0:32 GMT+02:00 Riley Baird <BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4Xix@bitmessage.ch>:
On 29/12/14 09:08, Yuri Oleynikov (יורי אולייניקוב wrote:
> 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?

I'm confused as to what you mean. If libxyz-common-tools is a dependency
of packageA, then why would you be trying to install packageA without
libxyz-common-tools installed?





--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 54A08504.1060301@bitmessage.ch" target="_blank">https://lists.debian.org/[🔎] 54A08504.1060301@bitmessage.ch



Reply to: