gentoo-alt  

Re: [gentoo-alt] AIX: libiconv issues still ?

Fabian Groffen
Wed, 23 May 2007 11:51:33 -0700

On 07-05-2007 13:25:48 +0200, Michael Haubenwallner wrote:
> > What if a relative link is given?
> 
> Valid point: then this is resolved to a file which is unlikely to exist,
> because it is started relative to $D, and the check will abort.
> 
> OTOH, gen_usr_ldscript() generates absolute symlinks, and this check
> ensures that: if there is no usr/lib/lib.so, there must not be a
> lib/lib.so.
> 
> But ok - what about this followup-patch:
> 
>     for a in "${ED}"usr/lib*/*.a ; do
a = usr/lib/libfoo.a
>         s=${a%.a}.so
s = usr/lib/libfoo.so
> -       if [[ -L ${s} ]] ; then
> -           s=${D}$(readlink "${s}") || s=${a%.a}.so
> +       if [[ -L ${s} ]] && rs=$(readlink "${s}"); then
rs = ../lib/libfoo.so.1
> +           [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}"
s = lib/libfoo.so.1
>         fi
>         if [[ ! -e ${s} ]] ; then
> +           s=${a%.a}.so
s = lib/libfoo.so.1.so
or
s = usr/lib/libfoo.so.so
I think this is wrong.  Is the replacement really necessary?  I think .a
has always been replaced in this case.
>             s=${s%usr/*}${s##*/usr/}
s = lib/libfoo.so(.so)
> +           if [[ -L ${s} ]] && rs=$(readlink "${s}"); then
> +               [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}"
Hmmm... if s is a link, and it is relative, should it start from
${ED}lib in that case?
> +           fi
>             if [[ -e ${s} ]] ; then
>                 vecho -ne '\a\n'
>                 eqawarn "QA Notice: Missing gen_usr_ldscript for ${s##*/}"
>                 abort="yes"
>             fi
>         fi
>     done

Really difficult stuff...

> > Apparently an invalid symlink makes -e (existence test) fail?
> 
> Exactly.
> The symlink ${ED}usr/lib/lib.so points to ${EPREFIX}/lib/lib.so, which
> does not exist because the package is not merged yet. Thus, 'test -e'
> fails on that symlink.
> 
> /haubi/

-- 
Fabian Groffen
Gentoo on a different level

-- 
[EMAIL PROTECTED] mailing list