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

Re: Computing d/control "Provides:" line



On Wed, Nov 23, 2011 at 5:16 PM, Gergely Nagy <algernon@balabit.hu> wrote:
> Mathieu Malaterre <mathieu.malaterre@gmail.com> writes:
>
>> On Wed, Nov 23, 2011 at 4:34 PM, Gergely Nagy <algernon@balabit.hu> wrote:
>>> What exactly would you want to put in the Provides field in this case?
>>
>> Right now it would be something like:
>>
>> Package: libactiviz.net-cil
>> Provides: libactiviz.net${`apt-cache policy libvtk5-dev | grep
>> Installed | cut -d: -f2 | cut -d- -f1`}-cil
>>
>> Of course I am not looking for "Installed version" per say, but the
>> idea is there: I need to compute the soversion of a package from
>> another package version. This would allow me to request binNMU instead
>> of doing source upload modifying one number in d/control.
>
> The -V option of dpkg-gencontrol is what you seek, in this case. You can
> do something like the following (assuming short-form dh7+):
>
> override_dh_gencontrol:
>        dh_gencontrol -- -VVTK_VERSION=$(shell ...)
>
> Then in debian/control, you can use
> Provides: libactiviz.net${VTK_VERSION}-cil
>
> Just figure out a better way to get the version than the apt-cache
> policy parsing.
>
> If not using short-form dh7+, have a look at the dpkg-gencontrol manpage
> (and dh_gencontrol, if using debhelper long form).

magnificent !


-- 
Mathieu


Reply to: