Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-alt
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-alt@g.o
From: Michael Haubenwallner <michael.haubenwallner@...>
Subject: Re: AIX: libiconv issues still ?
Date: Mon, 07 May 2007 13:25:48 +0200
On Fri, 2007-05-04 at 22:05 +0200, Fabian Groffen wrote:
> On 23-04-2007 10:43:06 +0200, Michael Haubenwallner wrote:
> > On Fri, 2007-04-20 at 17:53 +0200, Fabian Groffen wrote:
> > > On 20-04-2007 10:43:56 -0500, Marshall McMullen wrote:
> > > > WOO HOO , that worked! You ROCK Haubi !
> > > 
> > > So wait, hold on.  Where do I have to apply which patch now?
> > > 
> > 
> > to portage (bin/misc-functions.sh), the attached one.
> 
> > --- bin/misc-functions.sh.orig	2007-04-04 17:49:18.003057000 +0200
> > +++ bin/misc-functions.sh	2007-04-04 17:58:24.466904000 +0200
> > @@ -312,6 +312,9 @@
> >  	abort="no"
> >  	for a in "${ED}"usr/lib*/*.a ; do
> >  		s=${a%.a}.so
> > +		if [[ -L ${s} ]] ; then
> > +			s=${D}$(readlink "${s}") || s=${a%.a}.so
> 
> What's the || for?  (A trail of previous && || usage?)

This is just a fallback if 'readlink' fails.
Yes, this works even if it fails inside $().

> 
> > +		fi
> >  		if [[ ! -e ${s} ]] ; then
> >  			s=${s%usr/*}${s##*/usr/}
> >  			if [[ -e ${s} ]] ; then
> 
> I think this patch isn't safe.

I've also thought that this might be unsafe, but after some more
debugging, i've seen that it is as safe as the original check:
The original check does not ensure that the library-wrapper-script
usr/lib/lib.so actually refers to lib/lib.so, nor does this patch.

> 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
        s=${a%.a}.so
-       if [[ -L ${s} ]] ; then
-           s=${D}$(readlink "${s}") || s=${a%.a}.so
+       if [[ -L ${s} ]] && rs=$(readlink "${s}"); then
+           [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}"
        fi
        if [[ ! -e ${s} ]] ; then
+           s=${a%.a}.so
            s=${s%usr/*}${s##*/usr/}
+           if [[ -L ${s} ]] && rs=$(readlink "${s}"); then
+               [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}"
+           fi
            if [[ -e ${s} ]] ; then
                vecho -ne '\a\n'
                eqawarn "QA Notice: Missing gen_usr_ldscript for ${s##*/}"
                abort="yes"
            fi
        fi
    done

> 
> 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/


-- 
Salomon Automation GmbH - Friesachstrasse 15 - A-8114 Friesach bei Graz
Sitz der Gesellschaft: Friesach bei Graz
UID-NR:ATU28654300 - Firmenbuchnummer: 49324 K
Firmenbuchgericht: Landesgericht für Zivilrechtssachen Graz

--
gentoo-alt@g.o mailing list


Replies:
Re: AIX: libiconv issues still ?
-- Fabian Groffen
References:
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Marshall McMullen
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Re: AIX: libiconv issues still ?
-- Michael Haubenwallner
Re: AIX: libiconv issues still ?
-- Fabian Groffen
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: AIX: libiconv issues still ?
Next by thread:
Re: AIX: libiconv issues still ?
Previous by date:
Re: [prefix][solaris] shell problem inportage/configure
Next by date:
Re: revdep-rebuild and install_name


Updated Jun 17, 2009

Summary: Archive of the gentoo-alt mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.