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

Re: how to satisfy a patched build-dependency in debuild / pdebuild



Sandro Tosi schrieb:
> On Wed, May 20, 2009 at 14:28, Malte Forkel <malte.forkel@berlin.de> wrote:
>> Hi,
>>
>> an optional patch that I'd like to add to a package requires an
>> additional build dependency. If I append that dependency to
>> Build-Depends in debian/control as part of my patch, it is not checked
>> in time. It seems, the build dependencies are checked (by debuild) or
>> checked and satisfied (by pdebuild) before the patches are applied. But
>> if I add the dependency by permanently modifying the control file, it
>> needs to be fulfilled even when the patch is not used.
>>
>> Is it possible to have debuild re-check (and pdebuild re-satisfy) the
>> build dependencies just after alls patches have been applied? Is there a
>> different way to add a build dependency only when a specific patch is
>> active?
> 
> How do you determine it the patch is "active" or not? I'd say: add
> definitely the build-dep to the debian/control file, if the patch is
> "active" it will find what it needs, if it's not, it won't do no harm
> (ideally ;) ).
> 
> In particular because buildds (where the package will be built for all
> supported arch, if it's and arch:any) use a different software,
> sbuild, so I won't play the "force a reload of packaging info" game.
> 
> A general rule may be: patch upstream source code, not debian packaging file.
> 
> Regards,

Well, my patch is active if its in 00list :-)

But you're right, adding the dependency to debian/control is safe and
easy. It just "doesn't feel right" to always require a specific library
if its only used in a special configuration. The only remedy I can think
of is to document the relationsship between patch and build dependency
both in the patch and in the changelog. But I'd still prefer to tie the
two functionally rather than verbally.

In this particular case, the optional code already is part of the
upstream source code. It can be activated by a switch in the makefile.
My patch flips that switch, applies a slight modification to the
original source, and adjusts the build dependencies. Or so I thought...
Because I'm just building a variant of the package for the local
repository, luckily other build systems are not in play.

Cheers,
Malte


Reply to: