1 |
zmedico 08/08/19 06:12:53 |
2 |
|
3 |
Modified: ChangeLog baselayout-2.0.0.ebuild |
4 |
Log: |
5 |
Make the SYMLINK_LIB code in pkg_preinst merge files from lib directories |
6 |
to lib64 directories when necessary, instead of blindly wiping out the |
7 |
content of the lib dir. Thanks to Daniel Robbins for finding the cause of |
8 |
this issue, which he discovered when building stage1 with catalyst. |
9 |
(Portage version: 2.2_rc8_p11419/cvs/Linux 2.6.26-0810-x86-64 i686) |
10 |
|
11 |
Revision Changes Path |
12 |
1.469 sys-apps/baselayout/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/ChangeLog?rev=1.469&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/ChangeLog?rev=1.469&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/ChangeLog?r1=1.468&r2=1.469 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v |
21 |
retrieving revision 1.468 |
22 |
retrieving revision 1.469 |
23 |
diff -u -r1.468 -r1.469 |
24 |
--- ChangeLog 10 May 2008 10:03:38 -0000 1.468 |
25 |
+++ ChangeLog 19 Aug 2008 06:12:52 -0000 1.469 |
26 |
@@ -1,10 +1,16 @@ |
27 |
# ChangeLog for sys-apps/baselayout |
28 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.468 2008/05/10 10:03:38 vapier Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.469 2008/08/19 06:12:52 zmedico Exp $ |
31 |
|
32 |
# See the rc-scripts ChangeLog in subversion for release info: |
33 |
# http://sources.gentoo.org/viewcvs.py/*checkout*/baselayout/trunk/ChangeLog |
34 |
|
35 |
+ 19 Aug 2008; Zac Medico <zmedico@g.o> baselayout-2.0.0.ebuild: |
36 |
+ Make the SYMLINK_LIB code in pkg_preinst merge files from lib directories |
37 |
+ to lib64 directories when necessary, instead of blindly wiping out the |
38 |
+ content of the lib dir. Thanks to Daniel Robbins for finding the cause of |
39 |
+ this issue, which he discovered when building stage1 with catalyst. |
40 |
+ |
41 |
10 May 2008; Mike Frysinger <vapier@g.o> baselayout-2.0.0.ebuild: |
42 |
Install the Makefile into $D so that we can use it in pkg_preinst steps (for |
43 |
binpkgs) #218877 by Kevin Cody Jr. |
44 |
|
45 |
|
46 |
|
47 |
1.6 sys-apps/baselayout/baselayout-2.0.0.ebuild |
48 |
|
49 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild?rev=1.6&view=markup |
50 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild?rev=1.6&content-type=text/plain |
51 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild?r1=1.5&r2=1.6 |
52 |
|
53 |
Index: baselayout-2.0.0.ebuild |
54 |
=================================================================== |
55 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild,v |
56 |
retrieving revision 1.5 |
57 |
retrieving revision 1.6 |
58 |
diff -u -r1.5 -r1.6 |
59 |
--- baselayout-2.0.0.ebuild 10 May 2008 10:03:38 -0000 1.5 |
60 |
+++ baselayout-2.0.0.ebuild 19 Aug 2008 06:12:52 -0000 1.6 |
61 |
@@ -1,6 +1,6 @@ |
62 |
# Copyright 1999-2008 Gentoo Foundation |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild,v 1.5 2008/05/10 10:03:38 vapier Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.0.0.ebuild,v 1.6 2008/08/19 06:12:52 zmedico Exp $ |
66 |
|
67 |
inherit multilib |
68 |
|
69 |
@@ -40,13 +40,81 @@ |
70 |
touch "${ROOT}usr/local/${dir}"/.keep |
71 |
done |
72 |
|
73 |
- # Ugly compatibility with stupid ebuilds and old profiles symlinks |
74 |
- if [ "${SYMLINK_LIB}" = "yes" ] ; then |
75 |
- rm -r "${ROOT}"/{lib,usr/lib,usr/local/lib} 2>/dev/null |
76 |
- local lib=$(get_abi_LIBDIR ${DEFAULT_ABI}) |
77 |
- ln -s "${lib}" "${ROOT}lib" |
78 |
- ln -s "${lib}" "${ROOT}usr/lib" |
79 |
- ln -s "${lib}" "${ROOT}usr/local/lib" |
80 |
+ # Create symlinks for /lib, /usr/lib, and /usr/local/lib and |
81 |
+ # merge contents of duplicate directories if necessary. |
82 |
+ # Only do this when $ROOT != / since it should only be necessary |
83 |
+ # when merging to an empty $ROOT, and it's not very safe to perform |
84 |
+ # this operation when $ROOT = /. |
85 |
+ if [ "${SYMLINK_LIB}" = yes ] && [ "$ROOT" != / ] ; then |
86 |
+ local prefix libabi=$(get_abi_LIBDIR $DEFAULT_ABI) |
87 |
+ for prefix in "$ROOT"{,usr/,usr/local/} ; do |
88 |
+ |
89 |
+ [ ! -d "${prefix}lib" ] && rm -f "${prefix}lib" && \ |
90 |
+ mkdir -p "${prefix}lib" |
91 |
+ |
92 |
+ [ ! -d "$prefix$libabi" ] && ln -sf "${prefix}lib" |
93 |
+ |
94 |
+ [ -h "$prefix$libabi" ] && [ -d "${prefix}lib" ] && \ |
95 |
+ [ "$prefix$libabi" -ef "${prefix}lib" ] && continue |
96 |
+ |
97 |
+ local destdir=$prefix$libabi/ srcdir=${prefix}lib/ |
98 |
+ |
99 |
+ [ -d "$destdir" ] || die "unable to create '$destdir'" |
100 |
+ [ -d "$srcdir" ] || die "unable to create $srcdir" |
101 |
+ |
102 |
+ mv -f "$srcdir".keep "$destdir".keep 2>/dev/null |
103 |
+ if ! rmdir "$srcdir" 2>/dev/null ; then |
104 |
+ ewarn "merging contents of '$srcdir' into '$destdir':" |
105 |
+ |
106 |
+ # Move directories if the dest doesn't exist. |
107 |
+ find "$srcdir" -type d -print0 | \ |
108 |
+ while read -d $'\0' src ; do |
109 |
+ dest=$destdir${src#${srcdir}} |
110 |
+ if [ ! -d "$dest" ] ; then |
111 |
+ if [ -e "$dest" ] ; then |
112 |
+ ewarn " not overwriting file '$dest'" \ |
113 |
+ "with directory '$src'" |
114 |
+ continue |
115 |
+ fi |
116 |
+ mv -f "$src" "$dest" && \ |
117 |
+ ewarn " /${src#${ROOT}} merged" || \ |
118 |
+ ewarn " /${src#${ROOT}} not merged" |
119 |
+ fi |
120 |
+ done |
121 |
+ |
122 |
+ # Move non-directories. |
123 |
+ find "$srcdir" ! -type d -print0 | \ |
124 |
+ while read -d $'\0' src ; do |
125 |
+ dest=$destdir${src#${srcdir}} |
126 |
+ if [ -e "$dest" ] ; then |
127 |
+ if [ -d "$dest" ] ; then |
128 |
+ ewarn " not overwriting directory '$dest'" \ |
129 |
+ "with file '$src'" |
130 |
+ else |
131 |
+ if [ -f "$src" -a ! -s "$src" ] && \ |
132 |
+ [ -f "$dest" -a ! -s "$dest" ] ; then |
133 |
+ # Ignore empty files such as '.keep'. |
134 |
+ true |
135 |
+ else |
136 |
+ ewarn " not overwriting file '$dest'" \ |
137 |
+ "with file '$src'" |
138 |
+ fi |
139 |
+ fi |
140 |
+ continue |
141 |
+ fi |
142 |
+ |
143 |
+ mv -f "$src" "$dest" && \ |
144 |
+ ewarn " /${src#${ROOT}} merged" || \ |
145 |
+ ewarn " /${src#${ROOT}} not merged" |
146 |
+ done |
147 |
+ fi |
148 |
+ |
149 |
+ rm -rf "${prefix}lib" || \ |
150 |
+ die "unable to remove '${prefix}lib'" |
151 |
+ |
152 |
+ ln -s "$libabi" "${prefix}lib" || \ |
153 |
+ die "unable to create '${prefix}lib' symlink" |
154 |
+ done |
155 |
fi |
156 |
|
157 |
emake -C "${D}/usr/share/${PN}" DESTDIR="${ROOT}" layout || die "failed to layout filesystem" |