Gentoo Archives: gentoo-commits

From: "Paul Varner (fuzzyray)" <fuzzyray@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoolkit r739 - branches/gentoolkit-0.2.4 branches/gentoolkit-0.2.4/src/revdep-rebuild trunk/gentoolkit trunk/gentoolkit/bin
Date: Thu, 04 Feb 2010 15:59:43
Message-Id: E1Nd47G-000802-8T@stork.gentoo.org
1 Author: fuzzyray
2 Date: 2010-02-04 15:59:37 +0000 (Thu, 04 Feb 2010)
3 New Revision: 739
4
5 Modified:
6 branches/gentoolkit-0.2.4/ChangeLog
7 branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild
8 trunk/gentoolkit/ChangeLog
9 trunk/gentoolkit/bin/revdep-rebuild
10 Log:
11 Fix revdep-rebuild to parse include statements in /etc/ld.so.conf (Bug 298651). It will break with spaces in paths, so it needs a little bit more work before release.
12
13 Modified: branches/gentoolkit-0.2.4/ChangeLog
14 ===================================================================
15 --- branches/gentoolkit-0.2.4/ChangeLog 2010-02-02 18:26:13 UTC (rev 738)
16 +++ branches/gentoolkit-0.2.4/ChangeLog 2010-02-04 15:59:37 UTC (rev 739)
17 @@ -1,3 +1,7 @@
18 +2010-02-04: Paul Varner <fuzzyray@g.o>
19 + * revdep-rebuild: Fix revdep-rebuild to handle include statements in
20 + /etc/ld.so.conf. (Bug 298651)
21 +
22 2009-12-17: Paul Varner <fuzzyray@g.o>
23 * revdep-rebuild: Fix revdep-rebuild to properly honor
24 PORTAGE_NICENESS as an incremental to the current nice level. (Bug
25
26 Modified: branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild
27 ===================================================================
28 --- branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild 2010-02-02 18:26:13 UTC (rev 738)
29 +++ branches/gentoolkit-0.2.4/src/revdep-rebuild/revdep-rebuild 2010-02-04 15:59:37 UTC (rev 739)
30 @@ -636,6 +636,25 @@
31 einfo "Generated new $FILES_FILE"
32 fi
33 }
34 +parse_ld_so_conf() {
35 + # FIXME: not safe for paths with spaces
36 + local include
37 + for path in $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf); do
38 + if [[ $include = true ]]; then
39 + for include_path in $(sed '/^#/d;s/#.*$//' /etc/${path}); do
40 + echo $include_path
41 + done
42 + include=""
43 + continue
44 + fi
45 + if [[ $path != include ]]; then
46 + echo $path
47 + else
48 + include="true"
49 + continue
50 + fi
51 + done
52 +}
53 get_ldpath() {
54 local COMPLETE_LD_LIBRARY_PATH
55 [[ $SEARCH_BROKEN && $FULL_LD_PATH ]] || return
56 @@ -648,7 +667,7 @@
57 COMPLETE_LD_LIBRARY_PATH=(
58 /lib*
59 /usr/lib*
60 - $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf)
61 + $(parse_ld_so_conf)
62 $(sed 's:/[^/]*$::' < "$FILES_FILE" | sort -ru)
63 )
64 IFS=':'
65 @@ -1020,7 +1039,7 @@
66
67 # Get the directories from /etc/ld.so.conf
68 if [[ -r /etc/ld.so.conf && -s /etc/ld.so.conf ]]; then
69 - SEARCH_DIRS+=" "$(sed '/^#/d;s/#.*$//' /etc/ld.so.conf)
70 + SEARCH_DIRS+=" "$(parse_ld_so_conf)
71 fi
72
73 # Set the final variables
74
75 Modified: trunk/gentoolkit/ChangeLog
76 ===================================================================
77 --- trunk/gentoolkit/ChangeLog 2010-02-02 18:26:13 UTC (rev 738)
78 +++ trunk/gentoolkit/ChangeLog 2010-02-04 15:59:37 UTC (rev 739)
79 @@ -1,3 +1,7 @@
80 +2010-02-04: Paul Varner <fuzzyray@g.o>
81 + * revdep-rebuild: Fix revdep-rebuild to handle include statements in
82 + /etc/ld.so.conf. (Bug 298651)
83 +
84 2010-31-01: Christian Ruppert <idl0r@g.o>
85 * revdep-rebuild: Check for eerror in die() since an invalid option(long) or
86 missing arg will end up in calling die() before /etc/init.d/functions.sh
87 @@ -36,10 +40,10 @@
88
89 2009-08-18: Robert Buchholz <rbu@g.o>
90 * glsa-check: Remove 'new' target from glsa-list, everyone
91 - should use 'affected' or 'all'
92 + should use 'affected' or 'all'
93 * glsa-check: fix getminupgrade API doc and TypeError (Bug 281101)
94 * glsa-check: Make --pretend output in glsa-check nicer.
95 - Add colors and fix linebreaks.
96 + Add colors and fix linebreaks.
97
98 2009-06-22: Paul Varner <fuzzyray@g.o>
99 * glsa-check: Fix traceback with glsa-check -f (Bug 275105)
100
101 Modified: trunk/gentoolkit/bin/revdep-rebuild
102 ===================================================================
103 --- trunk/gentoolkit/bin/revdep-rebuild 2010-02-02 18:26:13 UTC (rev 738)
104 +++ trunk/gentoolkit/bin/revdep-rebuild 2010-02-04 15:59:37 UTC (rev 739)
105 @@ -664,6 +664,25 @@
106 einfo "Generated new $FILES_FILE"
107 fi
108 }
109 +parse_ld_so_conf() {
110 + # FIXME: not safe for paths with spaces
111 + local include
112 + for path in $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf); do
113 + if [[ $include = true ]]; then
114 + for include_path in $(sed '/^#/d;s/#.*$//' /etc/${path}); do
115 + echo $include_path
116 + done
117 + include=""
118 + continue
119 + fi
120 + if [[ $path != include ]]; then
121 + echo $path
122 + else
123 + include="true"
124 + continue
125 + fi
126 + done
127 +}
128 get_ldpath() {
129 local COMPLETE_LD_LIBRARY_PATH
130 [[ $SEARCH_BROKEN && $FULL_LD_PATH ]] || return
131 @@ -676,7 +695,7 @@
132 COMPLETE_LD_LIBRARY_PATH=(
133 /lib*
134 /usr/lib*
135 - $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf)
136 + $(parse_ld_so_conf)
137 $(sed 's:/[^/]*$::' < "$FILES_FILE" | sort -ru)
138 )
139 IFS=':'
140 @@ -1063,7 +1082,7 @@
141
142 # Get the directories from /etc/ld.so.conf
143 if [[ -r /etc/ld.so.conf && -s /etc/ld.so.conf ]]; then
144 - SEARCH_DIRS+=" "$(sed '/^#/d;s/#.*$//' /etc/ld.so.conf)
145 + SEARCH_DIRS+=" "$(parse_ld_so_conf)
146 fi
147
148 # Set the final variables