1 |
On 23-05-2007 23:58:48 +0200, Michael Haubenwallner wrote: |
2 |
> > > + s=${a%.a}.so |
3 |
> > s = lib/libfoo.so.1.so |
4 |
> > or |
5 |
> > s = usr/lib/libfoo.so.so |
6 |
> > I think this is wrong. Is the replacement really necessary? I think .a |
7 |
> > has always been replaced in this case. |
8 |
> |
9 |
> err, s is recreated from (still initial) $a, not (current) $s: |
10 |
|
11 |
My bad. |
12 |
|
13 |
> s = /D/prefix/usr/lib/libfoo.so |
14 |
> |
15 |
> > > s=${s%usr/*}${s##*/usr/} |
16 |
> > s = lib/libfoo.so(.so) |
17 |
> |
18 |
> s = /D/prefix/lib/libfoo.so |
19 |
> |
20 |
> > > + if [[ -L ${s} ]] && rs=$(readlink "${s}"); then |
21 |
> |
22 |
> lib/libfoo.so could be a symlink '-> libfoo.so.1'. |
23 |
> |
24 |
> rs = libfoo.so.1 |
25 |
> |
26 |
> Hmm, could this also be a symlink to somewhere outside lib/ ? |
27 |
> Or even '-> /prefix/lib/libfoo.so.1' ? |
28 |
> If not, we might not need to resolve symlinks (to $D) again here at all, |
29 |
> as [[ -e ]] succeeds if symlink is resolveable. |
30 |
|
31 |
I think it should exist. Nothing more. So -e should suffice. |
32 |
|
33 |
> > > + [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}usr/lib/${rs}" |
34 |
> > Hmmm... if s is a link, and it is relative, should it start from |
35 |
> > ${ED}lib in that case? |
36 |
> |
37 |
> oops, you're right, should read: |
38 |
> + [[ ${rs} == /* ]] && s="${D}${rs}" || s="${ED}lib/${rs}" |
39 |
|
40 |
Let's commit it like this then... |
41 |
|
42 |
-- |
43 |
Fabian Groffen |
44 |
Gentoo on a different level |
45 |
|
46 |
-- |
47 |
gentoo-alt@g.o mailing list |