1 |
Author: ulm |
2 |
Date: 2009-12-29 19:15:30 +0000 (Tue, 29 Dec 2009) |
3 |
New Revision: 747 |
4 |
|
5 |
Modified: |
6 |
trunk/ChangeLog |
7 |
trunk/modules/env.eselect |
8 |
Log: |
9 |
Remove the "makelinks" option in env module, bug 298742. |
10 |
|
11 |
Modified: trunk/ChangeLog |
12 |
=================================================================== |
13 |
--- trunk/ChangeLog 2009-12-29 14:17:08 UTC (rev 746) |
14 |
+++ trunk/ChangeLog 2009-12-29 19:15:30 UTC (rev 747) |
15 |
@@ -1,5 +1,11 @@ |
16 |
2009-12-29 Ulrich Mueller <ulm@g.o> |
17 |
|
18 |
+ * modules/env.eselect (do_update): Remove the "makelinks" option. |
19 |
+ The logic of this was always wrong, and mtime caching breaks with |
20 |
+ recent glibc versions. Bug 298742. |
21 |
+ (need_links, LDMTIMEDB): Function and variable removed. |
22 |
+ (describe_update_parameters, describe_update_options): Update. |
23 |
+ |
24 |
* modules/env.eselect (PATH_CLASS): Fix a typo, ADA_OBJECT_PATH |
25 |
should be ADA_OBJECTS_PATH. |
26 |
|
27 |
|
28 |
Modified: trunk/modules/env.eselect |
29 |
=================================================================== |
30 |
--- trunk/modules/env.eselect 2009-12-29 14:17:08 UTC (rev 746) |
31 |
+++ trunk/modules/env.eselect 2009-12-29 19:15:30 UTC (rev 747) |
32 |
@@ -35,7 +35,6 @@ |
33 |
ENVPROFILE="${EROOT}/etc/profile.env" |
34 |
LDCONFIG="${EROOT}/etc/ld.so.conf" |
35 |
PRELINK="${EROOT}/etc/prelink.conf" |
36 |
-LDMTIMEDB="${EROOT}/var/lib/eselect/env/ld-mtimedb" |
37 |
|
38 |
# Keep all stored LDPATHS |
39 |
ESELECT_LDPATH=( ) |
40 |
@@ -215,25 +214,6 @@ |
41 |
echo -n -e "${str}" >"$(canonicalise "${PRELINK}")" |
42 |
} |
43 |
|
44 |
-# need_links() |
45 |
-# Returns true if any item of ${LDPATH} has been modified. |
46 |
-need_links() { |
47 |
- local ret=1 |
48 |
- for x in "${ESELECT_LDPATH[@]}"; do |
49 |
- y=${x//\//_} |
50 |
- y=${y//-/_} |
51 |
- y=${y//./_} |
52 |
- y=${y//+/_} |
53 |
- oldmtime=$(load_config "${LDMTIMEDB}" "mtime${y}") |
54 |
- newmtime=$(stat -c %Y ${x} 2> /dev/null) |
55 |
- if [[ ${oldmtime} != ${newmtime} ]]; then |
56 |
- ret=0 |
57 |
- store_config "${LDMTIMEDB}" "mtime${y}" ${newmtime} |
58 |
- fi |
59 |
- done |
60 |
- return ${ret} |
61 |
-} |
62 |
- |
63 |
# update_ldcache() |
64 |
# Update ld.so.cache using ldconfig |
65 |
update_ldcache() { |
66 |
@@ -263,22 +243,21 @@ |
67 |
} |
68 |
|
69 |
describe_update_parameters() { |
70 |
- echo "<makelinks> <noldconfig>" |
71 |
+ echo "<noldconfig>" |
72 |
} |
73 |
|
74 |
describe_update_options() { |
75 |
- echo "makelinks : Specify \"makelinks\" to force updating of links" |
76 |
echo "noldconfig : Do not alter the ld.so cache or configuration." |
77 |
} |
78 |
|
79 |
do_update() { |
80 |
- local makelinks ldconfig=1 |
81 |
+ local ldconfig=1 |
82 |
while [[ $# -gt 0 ]]; do |
83 |
- case ${1} in |
84 |
+ case ${1##--} in |
85 |
makelinks) |
86 |
- makelinks="-X" |
87 |
+ # option is ignored, only for backwards compatibility |
88 |
;; |
89 |
- noldconfig) |
90 |
+ noldconfig|no-ldconfig) |
91 |
ldconfig=0 |
92 |
;; |
93 |
*) |
94 |
@@ -296,11 +275,10 @@ |
95 |
|
96 |
# Create configuration files |
97 |
create_profile_env |
98 |
- if [[ ${ldconfig} == 1 ]]; then |
99 |
+ if [[ ${ldconfig} -ne 0 ]]; then |
100 |
create_ld_so_conf |
101 |
[[ -e ${EROOT}/usr/sbin/prelink ]] && create_prelink_conf |
102 |
- need_links && makelinks="-X" |
103 |
- update_ldcache ${makelinks} |
104 |
+ update_ldcache |
105 |
fi |
106 |
|
107 |
# fix up ${ENVPROFILE} |