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

Re: Bug#439979: dpkg-dev: Please support removal of dpkg-cross diversions



Raphael Hertzog wrote:
> On Tue, 28 Aug 2007, Neil Williams wrote:
>> As outlined on the debian-dpkg lists, I've been testing the removal of
>> the dpkg-cross diversions of dpkg-buildpackage and dpkg-shlibdeps during
>> the rewrite of dpkg-cross and I now have two patches (slightly modified
>> from the last ones posted to the list) that I would like to see in
>> dpkg-dev as a beginning to a process to merge dpkg-cross back into dpkg.
> 
> Okay, to make it easier to not loose track of this I properly reassigned
> this to dpkg-dev and split it in two issues: one for dpkg-buildpackage and
> one for dpkg-shlibdeps.
> 
> Contrary to what Hector forwarded from you on -devel, the changes for
> dpkg-shlibdeps are relatively independant from the rest and since I've
> been doing the work on dpkg-shlibdeps I can review and merge a good patch
> of you.

I thought Guillem wanted to review the use of /usr/arm-linux-gnu/lib and
/usr/arm-linux-gnu/include ? I do have perl code that solves the problem
(used it to cross build GPE for Emdebian) involving adding search
directories to LD_LIBRARY_PATH but I wasn't sure if Guillem was looking
at a different implementation for those directories.

CC'ing debian-dpkg to find out.

Guillem: what are your plans for the diversion replacements?

Are you planning on changing the current usage of /usr/$arch/include
etc. or just changing the way that the diversion used to use a temporary
directory of symlinks or something else? Should Raphael and I work on a
solution for dpkg-shlibdeps using LD_LIBRARY_PATH using the example below?

> If you don't provide the patch, it'll take some more time but I'll get
> around to it sometime.

This is the core of what would be the patch:

my $crossprefix = &check_arch($arch);
#(check_arch takes a user-specified string and checks that
#dpkg-architecture supports it, then returns the triplet so for 'arm',
# e.g. $crossprefix="arm-linux-gnu";

my @librarypaths = qw( /lib /usr/lib /lib32 /usr/lib32 /lib64 /usr/lib64
        /emul/ia32-linux/lib /emul/ia32-linux/usr/lib );

my @shlibdeps = ( "${crossprefix}/lib", "/usr/${crossprefix}/lib",
        "/${crossprefix}/lib32", "/usr/${crossprefix}/lib32",
        "/${crossprefix}/lib64", "/usr/${crossprefix}/lib64",
        "/emul/ia32-linux/lib", "/emul/ia32-linux/usr/lib" );

my $libpath = join (":", @librarypaths) . join (":", @shlibdeps);

$ENV{LD_LIBRARY_PATH}.="$libpath";

That is what I'm using with the current dpkg-shlibdeps from 1.14.11 and
AFAICT it is fine (providing that the cross paths are added to the
standard paths and not replace them or perl gets confused).

If this method is ok, I'll prepare the patch against 1.14.11.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: