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

Re: Getting dh_install to do what we need

Josselin Mouette <joss@debian.org> writes:

> So, to sum it up. Before, you would do in debian/rules: 
>         sed s/@DEB_HOST_MULTIARCH@/${DEB_HOST_MULTIARCH}/ debian/libfoo.install.in > debian/libfoo.install
> Now, you will do in debian/foo.install:
>         #! /bin/sh 
>         sed s/@DEB_HOST_MULTIARCH@/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ << EOF
>         …
>         EOF
> (Bonus points for implementing this in a different language for each
> package.)
> Now that we’ve made incredible progress in terms of obfuscation, I’d
> appreciate if we could have a working solution that does not require
> scripting for the most trivial operations. So what remains? 
>       * Convincing Joey to revert this useless change and actually
>         commit something useful. 
>       * NMU debhelper. 
>       * Technical committee. 
>       * Fork dh_install in a new package.
> Any comments before someone starts doing either of these?

I'd like to offer another option: deal with it, and instead of doing any
of the above (none of which would be a good idea in the long run, except
maybe the first - but I quite like this feature as it is), embrace
it, and extend it.

And by extend, I mean something like:

| #! /usr/bin/dh_multiarchify
| /usr/lib/${DEB_HOST_MULTIARCH}/*

The /usr/bin/dh_multiarchify script would do the sed magic. This would
make the simple cases simple, and would still allow one to do
complicated magic, if so need be.

Something similar has worked well for dpatch in the past, and could be
used in this case too.


Reply to: