[debhelper-devel] Bug#759812: Bug#759812: Make the multiarch tuple available in helpers

Christian Kastner debian at kvr.at
Sat Aug 30 19:21:47 UTC 2014


On 2014-08-30 10:57, Joey Hess wrote:
> Christian Kastner wrote:
>> The attached patch extends dh_installdirs, dh_install, and dh_link such
>> that in v10 mode, the literal string :multiarch: is substituted with the
>> appropriate multiarch tuple during their operation.
> 
> I think that Ubuntu had a patch for this or something similar 
> earlier, so it may be good to reuse the syntax. Or perhaps ${multiarch}.

I had something similar in my first draft, but then thought that might
conflict with direct invocations, eg:

  dh_install foo.so /usr/lib/${multiarch}

To avoid expansion, the destination would have to be escaped. Of course,
if direct invocations aren't a use case, the choice is less critical.

> We need to avoid something that conflicts with anything in any debhelper
> config files. It would be good to eg, grep the lintian lab.
>
>> The substitution is currently applied not only to debian/package.*
>> files, but to direct invocations of the dh_* helpers as well. I don't
>> know if this is a problem.
> 
> It makes it harder to prove that it doesn't break anything currently.
> Is there any use case for it?

I was going to say no, but I think I may have come up with one: what
about dh_install/dh_link calls excluding files with -X?

I can't see a use case for direct invocations of dh_installdirs.

>> +my $multiarch=dpkg_architecture_value("DEB_HOST_MULTIARCH");
> 
>> +			s/:multiarch:/$multiarch/g for @$set;
> 
> This forces a call to dpkg-architecture in the common case where the
> substitution is not used. Instead, it should only look up the value
> once it find a use of it.
> 
> That will be more complicated, but this repeated code needs to be
> refactored anyway..

I'm not a perl guy, but I'll try to look into it.


Christian




More information about the debhelper-devel mailing list