Hello community, here is the log from the commit of package aaa_base for openSUSE:Factory checked in at Sat May 16 00:19:47 CEST 2009. -------- --- aaa_base/aaa_base.changes 2009-05-07 12:00:48.000000000 +0200 +++ aaa_base/aaa_base.changes 2009-05-12 16:06:44.000000000 +0200 @@ -1,0 +2,10 @@ +Tue May 12 16:04:51 CEST 2009 - werner@suse.de + +- Make some expansions work for bash completion (bnc#493303, bnc#487252) + +------------------------------------------------------------------- +Fri May 8 15:01:04 CEST 2009 - werner@suse.de + +- Add missing line in boot.clock + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aaa_base.spec ++++++ --- /var/tmp/diff_new_pack.S15953/_old 2009-05-16 00:19:20.000000000 +0200 +++ /var/tmp/diff_new_pack.S15953/_new 2009-05-16 00:19:20.000000000 +0200 @@ -28,7 +28,7 @@ PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date /usr/bin/cmp /bin/fillup /sbin/insserv udev net-tools AutoReqProv: on Version: 11.2 -Release: 25 +Release: 26 Summary: SUSE Linux Base Package BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: aaa_base.tar.bz2 @@ -139,6 +139,10 @@ %defattr(-,root,root) %changelog +* Tue May 12 2009 werner@suse.de +- Make some expansions work for bash completion (bnc#493303, bnc#487252) +* Fri May 08 2009 werner@suse.de +- Add missing line in boot.clock * Thu May 07 2009 werner@suse.de - At shutdown boot.clock should be executed *before* boot.apparmor otherwise it may happen that /etc/localtime is not readable and ++++++ aaa_base.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/etc/init.d/boot.clock new/aaa_base/etc/init.d/boot.clock --- old/aaa_base/etc/init.d/boot.clock 2009-05-07 11:50:21.000000000 +0200 +++ new/aaa_base/etc/init.d/boot.clock 2009-05-08 15:00:53.000000000 +0200 @@ -13,6 +13,7 @@ # Should-Start: $null # Should-Stop: apparmor # X-Start-Before: boot.localfs +# X-Stop-After: $null # Default-Start: B S # Default-Stop: # Description: Read hardware clock and set system clock diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/etc/init.d/boot.localfs new/aaa_base/etc/init.d/boot.localfs --- old/aaa_base/etc/init.d/boot.localfs 2009-04-29 17:26:35.000000000 +0200 +++ new/aaa_base/etc/init.d/boot.localfs 2009-05-08 15:19:20.000000000 +0200 @@ -357,8 +357,16 @@ rc_exit fi + # # If e.g. /var is on a different filesystem than / make sure we can umount - mkill -TERM $ulist + # but check if /etc/ld.so.preload exists and if this may hold a partition + # even for root file systems based programs + # + if test -s /etc/ld.so.preload && grep -qE "(${ulist// /|})" /etc/ld.so.preload ; then + echo "${warn}Oops${done}: /etc/ld.so.preload exist and breaks the system :-(" + else + mkill -TERM $ulist + fi UMOUNT_FAILED=false umount -rv $mtab -t no${tmpfs//,/,no},$nofs -O no_netdev $ulist || { @@ -368,7 +376,7 @@ rc_status -v1 -r if test "$UMOUNT_FAILED" = true -a -z "$mtab" ; then - echo "Oops: umount failed :-( -- trying to remount readonly..." + echo "${warn}Oops${done}: umount failed :-( -- trying to remount readonly..." ulist=,${ulist// /,}, mounts=/etc/fstab test -r /proc/mounts && mounts=/proc/mounts diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/etc/profile.d/complete.bash new/aaa_base/etc/profile.d/complete.bash --- old/aaa_base/etc/profile.d/complete.bash 2009-01-20 17:31:18.000000000 +0100 +++ new/aaa_base/etc/profile.d/complete.bash 2009-05-12 15:48:11.000000000 +0200 @@ -7,21 +7,64 @@ # REQUIRES bash 2.0 and higher # -_def=; _dir=; _file=; _nosp= if complete -o default _nullcommand &> /dev/null ; then _def="-o default" _dir="-o dirnames" - _file="-o filenames" + _file="-o filenames" +else + _def="" + _dir="" + _file="" fi -_minusdd="-d ${_dir}" -_minusdf="-d ${_file}" if complete -o nospace _nullcommand &> /dev/null ; then _nosp="-o nospace" - _minusdd="${_nosp} ${_dir}" - _minusdf="${_nosp} ${_dir}" + _minusdd="${_def} ${_nosp} ${_dir}" + _minusdf="${_def} ${_nosp} ${_dir}" +else + _nosp="" + _minusdd="-d ${_dir}" + _minusdf="-d ${_file}" fi complete -r _nullcommand &> /dev/null +# Escape file and directory names, add slash to directories if needed. +# Escaping could be done by the option 'filenames' but this fails +# e.g. on variable expansion like $HO<TAB> +_compreply_ () +{ + local IFS=$'\n' + local s x + local -i o + + test ${#COMPREPLY[@]} -eq 0 && return 0 + + # + # Escape spaces and braces in path names with `\' + # + s="${COMP_WORDBREAKS// }" + s="${s// }" + s="${s//[\{\}()\[\]]}" + s="${s} (){}[]" + o=${#s} + + while test $((o--)) -gt 0 ; do + x="${s:${o}:1}" + case "$x" in + \() COMPREPLY=($(echo "${COMPREPLY[*]}"|command sed -r 's/\(/\\\(/g')) ;; + *) COMPREPLY=(${COMPREPLY[*]//${x}/\\${x}}) ;; + esac + done + + # + # Append a slash on the real result, avoid annoying double tab + # + for ((o=0; o < ${#COMPREPLY[*]}; o++)) ; do + test -d "${COMPREPLY[$o]}" || continue + test -z "${COMPREPLY[$o]##*/}" || continue + COMPREPLY[$o]="${COMPREPLY[$o]}/" + done +} + # Expanding shell function for directories _cd_ () { @@ -34,8 +77,8 @@ test $g -eq 0 && shopt -s extglob case "$(complete -p ${1##*/} 2> /dev/null)" in - mkdir) ;; - *) s="-S/" + mkdir) ;; + *) s="-S/" esac case "$c" in @@ -49,8 +92,8 @@ \$\{*\}) eval COMPREPLY=\(${c}\) ;; \$\{*) COMPREPLY=($(compgen -v -P '${' -S '}' -- ${c#??})) ;; \$*) COMPREPLY=($(compgen -v -P '$' $s -- ${c#?})) ;; - \~*/*) COMPREPLY=($(compgen -d $s -- "${c}")) ;; - \~*) COMPREPLY=($(compgen -u $s -- "${c}")) ;; + \~*/*) COMPREPLY=($(compgen -d $s -- "${c}")) ;; + \~*) COMPREPLY=($(compgen -u $s -- "${c}")) ;; *\:*) if [[ $COMP_WORDBREAKS =~ : ]] ; then local C=${c%"${c##*[^\\]:}"} @@ -80,34 +123,10 @@ done fi - if test ${#COMPREPLY[@]} -gt 0 ; then - # - # Escape spaces and braces in path names with `\' - # - s="${COMP_WORDBREAKS// }" - s="${s// }" - s="${s//[\{\}()\[\]]}" - s="${s} (){}[]" - o=${#s} - - while test $((o--)) -gt 0 ; do - c="${s:${o}:1}" - COMPREPLY=(${COMPREPLY[*]//${c}/\\${c}}) - done - fi - - # - # Append a slash on the real result, avoid annoying double tab - # - if test "${1##*/}" != "mkdir" -a ${#COMPREPLY[@]} -eq 1 ; then - x=${COMPREPLY[0]} - o=$((${#x} - 1)) - if test "$x" = "$c" -a "${x:${o}:1}" != "/"; then - COMPREPLY[0]="${x}/" - fi - fi + _compreply_ test $g -eq 0 && shopt -u extglob + return 0 } if shopt -q cdable_vars; then @@ -126,6 +145,7 @@ local c=${COMP_WORDS[COMP_CWORD]} local a="${COMP_LINE}" local e s g=0 cd dc t="" + local -i o local IFS shopt -q extglob && g=1 @@ -140,10 +160,10 @@ case "$c" in -) COMPREPLY=(d c) test $g -eq 0 && shopt -u extglob - return ;; + return 0 ;; -?|-??) COMPREPLY=($c) test $g -eq 0 && shopt -u extglob - return ;; + return 0 ;; esac case "$a" in $cd|$dc) e='!*.bz2' ;; @@ -154,16 +174,44 @@ case "$c" in -) COMPREPLY=(d c) test $g -eq 0 && shopt -u extglob - return ;; + return 0 ;; -?|-??) COMPREPLY=($c) test $g -eq 0 && shopt -u extglob - return ;; + return 0 ;; esac case "$a" in $cd|$dc) e='!*.+(gz|tgz|z|Z)' ;; *) e='*.+(gz|tgz|z|Z)' ;; esac ;; gunzip) e='!*.+(gz|tgz|z|Z)' ;; + lzma) + case "$c" in + -) COMPREPLY=(d c) + test $g -eq 0 && shopt -u extglob + return 0 ;; + -?|-??) COMPREPLY=($c) + test $g -eq 0 && shopt -u extglob + return 0 ;; + esac + case "$a" in + $cd|$dc) e='!*.+(lzma)' ;; + *) e='*.+(lzma)' ;; + esac ;; + unlzma) e='!*.+(lzma)' ;; + xz) + case "$c" in + -) COMPREPLY=(d c) + test $g -eq 0 && shopt -u extglob + return 0 ;; + -?|-??) COMPREPLY=($c) + test $g -eq 0 && shopt -u extglob + return 0 ;; + esac + case "$a" in + $cd|$dc) e='!*.+(xz)' ;; + *) e='*.+(xz)' ;; + esac ;; + unxz) e='!*.+(xz)' ;; uncompress) e='!*.Z' ;; unzip) e='!*.+(???)' t="@(MS-DOS executable|Zip archive)*" ;; @@ -178,7 +226,7 @@ *=*) c=${c#*=} ;; *) COMPREPLY=($(compgen -v -- ${c})) test $g -eq 0 && shopt -u extglob - return ;; + return 0 ;; esac ;; *) e='!*' @@ -206,30 +254,73 @@ if test $g -eq 0 ; then COMPREPLY=($(compgen -f -X "$e" -- $c)) test $g -eq 0 && shopt -u extglob - return + return 0 fi COMPREPLY=($(compgen -G "${c}")) ;; *) if test "$c" = ".." ; then - COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c)) + COMPREPLY=($(compgen -d -X "$e" ${_nosp} -- $c)) else - for s in $(compgen -f -X "$e" -- $c) ; do - if test -d $s ; then - COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s)) - elif test -z "$t" ; then - COMPREPLY=(${COMPREPLY[@]} $s) - else - case "$(file -b $s 2> /dev/null)" in - $t) COMPREPLY=(${COMPREPLY[@]} $s) ;; + if test -n "$t" ; then + let o=0 + COMPREPLY=() + for s in $(compgen -f -X "$e" -- $c) ; do + case "$(file -b "$s" 2> /dev/null)" in + directory) COMPREPLY[$((o++))]="$s" ;; + $t) COMPREPLY[$((o++))]="$s" ;; esac - fi - done - fi ;; + done + else + COMPREPLY=($(compgen -f -X "$e" -- $c)) + fi + fi esac + test $g -eq 0 && shopt -u extglob + return 0 } -complete -d -X '.[^./]*' -F _exp_ ${_file} \ +_gdb_ () +{ + local c=${COMP_WORDS[COMP_CWORD]} + local x + local -i o + + if test $COMP_CWORD -eq 1 ; then + case "$c" in + -*) COMPREPLY=($(compgen -W '-args -tty -s -e -se -c -x -d' -- "$c")) ;; + *) COMPREPLY=($(compgen -c -- "$c")) + esac + return 0 + fi + local p=${COMP_WORDS[COMP_CWORD-1]} + case "$p" in + -args) COMPREPLY=($(compgen -c -- "$c")) ;; + -tty) COMPREPLY=(/dev/tty* /dev/pts/*) + COMPREPLY=($(compgen -W "${COMPREPLY[*]}" -- "$c")) ;; + -s|e|-se) COMPREPLY=($(compgen -f -- "$c")) ;; + -c|-x) COMPREPLY=($(compgen -f -- "$c")) ;; + -d) COMPREPLY=($(compgen -d ${_nosp} -- "$c")) ;; + *) + if test -z "$c"; then + COMPREPLY=($(command ps axho comm,pid |\ + command sed -rn "\@^${p##*/}@{ s@.*[[:blank:]]+@@p; }")) + else + COMPREPLY=() + fi + let o=${#COMPREPLY[*]} + for s in $(compgen -f -- "$c") ; do + case "$(file -b "$s" 2> /dev/null)" in + directory) COMPREPLY[$((o++))]="$s" ;; + *) COMPREPLY[$((o++))]="$s" ;; + esac + done + esac + + return 0 +} + +complete -d -X '.[^./]*' -F _exp_ ${_file} ${_def} \ compress \ bzip2 \ bunzip2 \ @@ -242,10 +333,9 @@ acroread xpdf kpdf \ dvips xdvi kdvi \ tex latex pdflatex -# No clean way to hande variable expansion _and_ file/dir name expansion -# with the same string. So let the default expansion on for that commands. -#complete -d -F _exp_ ${_def} chown chgrp chmod chattr ln -#complete -d -F _exp_ ${_def} more cat less strip grep vi ed + +complete -d -F _exp_ ${_file} ${_def} chown chgrp chmod chattr ln +complete -d -F _exp_ ${_file} ${_def} more cat less strip grep vi ed complete -A function -A alias -A command -A builtin \ type @@ -261,7 +351,8 @@ complete -A builtin builtin complete -A export printenv complete -A command ${_def} command which nohup exec nice eval -complete -A command ${_def} ltrace strace gdb +complete -A command ${_def} ltrace strace +complete -F _gdb_ ${_file} ${_def} gdb HOSTFILE="" test -s $HOME/.hosts && HOSTFILE=$HOME/.hosts complete -A hostname ping telnet slogin rlogin \ @@ -302,8 +393,8 @@ s=$(eval echo {${m}}$o/) if type -p sed &> /dev/null ; then COMPREPLY=(\ - $(ls -1fUA $s 2>/dev/null|\ - sed -n "/^$c/{s@\.[0-9n].*\.gz@@g;s@.*/:@@g;p;}")\ + $(command ls -1UA $s 2>/dev/null|\ + command sed -rn "/^$c/{s@\.[0-9n].*\.gz@@g;s@.*/:@@g;p;}")\ ) else s=($(ls -1fUA $s 2>/dev/null)) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org