By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 675
Collapse All | Expand All

(-)/opt/trinity/bin/startkde (-26 / +48 lines)
Lines 16-38 Link Here
16
fi
16
fi
17
17
18
# Some functions to parse and check path correctly ...
18
# Some functions to parse and check path correctly ...
19
# Usage: is_in_path PATH /usr/bin
19
is_in_path() {
20
is_in_path() {
20
  search="$1"; ifs="$IFS"; IFS=":"; set $PATH; IFS="$ifs"
21
  var="$1"; search="$2"; 
22
  if eval test -z \$$1; then return 1; fi
23
  ifs="$IFS"; IFS=":"; eval set \$$var; IFS="$ifs"
21
  for i in $*; do
24
  for i in $*; do
22
    [ "${i}" = "${search}" ] && return 0
25
    [ "${i}" = "${search}" ] && return 0
23
  done
26
  done
24
  return 1
27
  return 1
25
}
28
}
26
29
27
# Usage: place_before_in_path /opt/trinity/games /usr/games
30
# Usage: place_before_in_path PATH /opt/trinity/games /usr/games
28
place_before_in_path() {
31
place_before_in_path() {
29
  insert="$1"; before="$2"; ifs="$IFS"; IFS=":"; set $PATH; IFS="$ifs"
32
  var="$1"; insert="$2"; 
33
  if eval test -z \$$1; then
34
    eval export $var=${insert}
35
  else
36
    before="$3"; ifs="$IFS"; IFS=":"; eval set \$$var; IFS="$ifs"
37
    NPATH=""
38
    for i in $*; do
39
      [ "${i}" = "${before}" ] && NPATH="${NPATH}:${insert}"
40
      NPATH="${NPATH}:${i}"
41
    done
42
    eval export $var=${NPATH#:}
43
  fi
44
}
45
46
# Usage: remove_from_path PATH /opt/trinity/games
47
remove_from_path() {
48
  var="$1"; remove="$2";
49
  if eval test -z \$$1; then return 1; fi
50
  ifs="$IFS"; IFS=":"; eval set \$$var; IFS="$ifs"
30
  NPATH=""
51
  NPATH=""
31
  for i in $*; do
52
  for i in $*; do
32
    [ "${i}" = "${before}" ] && NPATH="${NPATH}:${insert}"
53
    [ "${i}" != "${remove}" ] && NPATH="${NPATH}:${i}"
33
    NPATH="${NPATH}:${i}"
34
  done
54
  done
35
  export PATH=${NPATH#:}
55
  eval export $var=${NPATH#:}
36
}
56
}
37
57
38
echo "[startkde] Starting startkde." 1>&2
58
echo "[startkde] Starting startkde." 1>&2
Lines 154-183 Link Here
154
174
155
# Modify the following environment variables only as necessary.
175
# Modify the following environment variables only as necessary.
156
if [ -d $KDEDIR/games ]; then
176
if [ -d $KDEDIR/games ]; then
157
  if ! is_in_path "$KDEDIR/games" ; then
177
  if ! is_in_path PATH "$KDEDIR/games" ; then
158
    # Respect the traditional path order. Don't blindly place $KDEDIR/games
178
    # Respect the traditional path order. Don't blindly place $KDEDIR/games
159
    # first in the path. Only place $KDEDIR/games before /usr/games. If packagers
179
    # first in the path. Only place $KDEDIR/games before /usr/games. If packagers
160
    # are adding $KDEDIR/games elsewhere, then they need to ensure the traditional
180
    # are adding $KDEDIR/games elsewhere, then they need to ensure the traditional
161
    # search patch is respected.
181
    # search patch is respected.
162
    # Is there a way we can check that $KDEDIR/games is always placed only just before
182
    # Is there a way we can check that $KDEDIR/games is always placed only just before
163
    # /usr/games in the search path?
183
    # /usr/games in the search path?
164
    if is_in_path "/usr/games"; then
184
    if is_in_path PATH "/usr/games"; then
165
      place_before_in_path "$KDEDIR/games" "/usr/games"
185
      place_before_in_path PATH "$KDEDIR/games" "/usr/games"
166
    else
186
    else
167
      export PATH=$KDEDIR/games:$PATH
187
      export PATH=$KDEDIR/games:$PATH
168
    fi
188
    fi
169
  fi
189
  fi
170
fi
190
fi
171
if [ -d $KDEDIR/bin ]; then
191
if [ -d $KDEDIR/bin ]; then
172
  if ! is_in_path "$KDEDIR/bin" ]; then
192
  if ! is_in_path PATH "$KDEDIR/bin" ]; then
173
    # Respect the traditional path order. Don't blindly place $KDEDIR/bin
193
    # Respect the traditional path order. Don't blindly place $KDEDIR/bin
174
    # first in the path. Only place $KDEDIR/bin before /usr/bin. This order is
194
    # first in the path. Only place $KDEDIR/bin before /usr/bin. This order is
175
    # consistent with kdelibs/kdesu/stub.cpp. If packagers are adding $KDEDIR/bin
195
    # consistent with kdelibs/kdesu/stub.cpp. If packagers are adding $KDEDIR/bin
176
    # elsewhere, then they need to ensure the traditional search patch is respected.
196
    # elsewhere, then they need to ensure the traditional search patch is respected.
177
    # Is there a way we can check that $KDEDIR/bin is always placed only just before
197
    # Is there a way we can check that $KDEDIR/bin is always placed only just before
178
    # /usr/bin in the search path?
198
    # /usr/bin in the search path?
179
    if is_in_path "/usr/bin"; then
199
    if is_in_path PATH "/usr/bin"; then
180
      place_before_in_path "$KDEDIR/bin" "/usr/bin"
200
      place_before_in_path PATH "$KDEDIR/bin" "/usr/bin"
181
    else
201
    else
182
      export PATH=$KDEDIR/bin:$PATH
202
      export PATH=$KDEDIR/bin:$PATH
183
    fi
203
    fi
Lines 240-270 Link Here
240
# set in $KDEDIRS are intended to override data files found in $KDEDIR. Those additional
260
# set in $KDEDIRS are intended to override data files found in $KDEDIR. Those additional
241
# directories should be placed before $KDEDIR and before /usr/share.
261
# directories should be placed before $KDEDIR and before /usr/share.
242
if [ "$KDEDIR" != "/usr" ] && [ -d $KDEDIR/share ]; then
262
if [ "$KDEDIR" != "/usr" ] && [ -d $KDEDIR/share ]; then
243
  if [ "$XDG_DATA_DIRS" = "" ]; then
263
  # If '/usr/share' is not already here, we include it at the last position.
244
    # Ensure the standard location of /usr/share is included.
264
  if ! is_in_path XDG_DATA_DIRS "/usr/share"; then
245
    XDG_DATA_DIRS=/usr/share
265
    XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share
246
  else
247
    if [ "`echo $XDG_DATA_DIRS | grep \"/usr/share\"`" = "" ]; then
248
      XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share
249
    fi
250
  fi
251
  if [ "`echo $XDG_DATA_DIRS | grep \"$KDEDIR/share\"`" = "" ]; then
252
    XDG_DATA_DIRS=$KDEDIR/share:$XDG_DATA_DIRS
253
  fi
266
  fi
267
268
  # Ensure that $KDEDIR/share is always before '/usr/share'.
269
  remove_from_path XDG_DATA_DIRS $KDEDIR/share
270
  place_before_in_path XDG_DATA_DIRS "$KDEDIR/share" "/usr/share"
271
  
272
  # Adds supplementary directories from KDEDIRS, if any, before KDEDIR.
254
  if [ "$KDEDIRS" != "" ]; then
273
  if [ "$KDEDIRS" != "" ]; then
255
    for i in `seq \`echo $KDEDIRS | awk -F : '{print NF}'\` -1 1`; do
274
    ifs="$IFS"; IFS=":"; set $KDEDIRS; IFS="$ifs"
256
      if [ "`echo $XDG_DATA_DIRS | grep \"\`echo $KDEDIRS | cut -d: -f${i}\`\"`" = "" ]; then
275
    for dir in $*; do
257
        XDG_DATA_DIRS=`echo $KDEDIRS | cut -d: -f${i}`/share:$XDG_DATA_DIRS
276
      if ! is_in_path XDG_DATA_DIRS "$dir/share" && [ -d "$dir/share" ]; then
277
        XDG_DATA_DIRS=$dir/share:$XDG_DATA_DIRS
258
      fi
278
      fi
259
    done
279
    done
260
  fi
280
  fi
261
  export XDG_DATA_DIRS
281
  export XDG_DATA_DIRS
262
fi
282
fi
263
283
284
echo "[startkde] XDG_DATA_DIRS: $XDG_DATA_DIRS" 1>&2
285
264
test -n "$KDEHOME" && kdehome=`echo "$KDEHOME" | sed "s,^~/,$HOME/,"`
286
test -n "$KDEHOME" && kdehome=`echo "$KDEHOME" | sed "s,^~/,$HOME/,"`
265
287
266
# Allow interested applications, such as the Plasma control wrapper,
288
# Allow interested applications, such as the Plasma control wrapper,
267
# to know that this is a Trinity desktop and not a TDE one.
289
# to know that this is a Trinity desktop and not a KDE one.
268
export DESKTOP_SESSION=trinity
290
export DESKTOP_SESSION=trinity
269
291
270
# Please see kstartupconfig source for usage.
292
# Please see kstartupconfig source for usage.

Return to bug 675