Hello community, here is the log from the commit of package aaa_base checked in at Tue Jun 3 00:48:00 CEST 2008. -------- --- aaa_base/aaa_base.changes 2008-05-20 09:26:09.000000000 +0200 +++ /mounts/work_src_done/STABLE/aaa_base/aaa_base.changes 2008-06-02 18:30:25.380599000 +0200 @@ -1,0 +2,17 @@ +Mon Jun 2 18:29:56 CEST 2008 - ro@suse.de + +- marked /etc/bash.bashrc as config (bnc#382804) + +------------------------------------------------------------------- +Mon Jun 2 18:07:22 CEST 2008 - ro@suse.de + +- change sysconf_addword to work with sed instead of ed + (bnc#377131) + +------------------------------------------------------------------- +Wed May 28 19:02:08 CEST 2008 - werner@suse.de + +- Make colon work in _cd_ expansion shell function even if part + of COMP_WORDBREAKS (bnc#391955) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aaa_base.spec ++++++ --- /var/tmp/diff_new_pack.V29686/_old 2008-06-03 00:47:37.000000000 +0200 +++ /var/tmp/diff_new_pack.V29686/_new 2008-06-03 00:47:37.000000000 +0200 @@ -21,7 +21,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.0 -Release: 71 +Release: 73 Summary: SUSE Linux Base Package BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: aaa_base.tar.bz2 @@ -143,6 +143,14 @@ %defattr(-,root,root) %changelog +* Mon Jun 02 2008 ro@suse.de +- marked /etc/bash.bashrc as config (bnc#382804) +* Mon Jun 02 2008 ro@suse.de +- change sysconf_addword to work with sed instead of ed + (bnc#377131) +* Wed May 28 2008 werner@suse.de +- Make colon work in _cd_ expansion shell function even if part + of COMP_WORDBREAKS (bnc#391955) * Tue May 20 2008 werner@suse.de - Remove last occurence of boot.setclock (bnc#384254) * Mon May 19 2008 werner@suse.de ++++++ aaa_base.specialfilelist ++++++ --- aaa_base/aaa_base.specialfilelist 2007-10-19 15:23:23.000000000 +0200 +++ /mounts/work_src_done/STABLE/aaa_base/aaa_base.specialfilelist 2008-06-02 18:29:55.508515000 +0200 @@ -4,6 +4,7 @@ %config(noreplace) /etc/inittab %config /root/bin/cron.daily %config /root/bin/cron.daily.local +%config /etc/bash.bashrc %config /etc/csh.cshrc %config /etc/csh.login %config /etc/inputrc ++++++ aaa_base.tar.bz2 ++++++ 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 2007-02-26 16:05:33.000000000 +0100 +++ new/aaa_base/etc/profile.d/complete.bash 2008-05-28 19:01:46.000000000 +0200 @@ -49,9 +49,14 @@ \$*) COMPREPLY=($(compgen -v -P '$' $s -- ${c#?})) ;; \~*/*) COMPREPLY=($(compgen -d $s -- "${c}")) ;; \~*) COMPREPLY=($(compgen -u $s -- "${c}")) ;; + *\:*) + if [[ $COMP_WORDBREAKS =~ : ]] ; then + COMPREPLY=($(compgen -d $s -- "${c}")) + COMPREPLY=(${COMPREPLY[*]//${c%:*}:/}) + fi esac - if test "${1##*/}" = "cd" ; then + if test "${1##*/}" = "cd" -a ${#COMPREPLY[@]} -gt 0 ; then # # Handle the CDPATH variable # @@ -70,23 +75,21 @@ done fi - # - # Escape spaces and braces in path names with `\' - # - s="${COMP_WORDBREAKS// }" - s="${s// }" - s="${s//[\{\}()\[\]]}" - s="${s} (){}[]" - - for x in ${COMPREPLY[@]} ; do + 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}" - x=${x//${c}/\\${c}} + COMPREPLY=(${COMPREPLY[*]//${c}/\\${c}}) done - C=(${C[@]} $x) - done - COMPREPLY=(${C[@]}) + fi # # Append a slash on the real result, avoid annoying double tab diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/aaa_base/usr/sbin/sysconf_addword new/aaa_base/usr/sbin/sysconf_addword --- old/aaa_base/usr/sbin/sysconf_addword 2007-10-30 18:43:07.000000000 +0100 +++ new/aaa_base/usr/sbin/sysconf_addword 2008-06-02 18:07:11.000000000 +0200 @@ -32,6 +32,13 @@ EOF } +function find_last_occurrence () { + # takes two arguments, FILE and VAR + # and return the number of the last line where + # VAR occurs in FILE (not commented) + grep -n -- "^[[:space:]]*$1" $2 | tail -n 1 | cut -d: -f1 +} + function word_present () { . $file case " ${!var} " in @@ -45,20 +52,15 @@ local word_quoted=$2 if ! word_present; then $debug && cp $file $tmpf - - cat <<-EOT_ED | ed -s $file &>/dev/null - H - # search backwards to last occurrence of var - ?^$var - s/^\($var=".*\)\(".*\)/\1 $word_quoted\2/ - s/=" /="/ - wq - EOT_ED - + sed -i -e "${lineno} { + s/^[[:space:]]*\($var=\".*\)\(\".*\)/\1 $word_quoted\2/; + s/=\" /=\"/ + }" $file $debug && diff -u $tmpf $file else echo \"$word\" already present fi + # some balancing for vim"s syntax highlighting } function remove_word() { @@ -66,20 +68,15 @@ local word_quoted=$2 if word_present; then $debug && cp $file $tmpf - - cat <<-EOT_ED | ed -s $file &>/dev/null - H - # search backwards to last occurrence of var - ?^$var - s/\(['" ]\)$word_quoted\(['" ]\)/\1 \2/g - s/ / /g - wq - EOT_ED - + sed -i -e "${lineno} { + s/\(['\" ]\)$word_quoted\(['\" ]\)/\1 \2/g + s/ / /g + }" $file $debug && diff -u $tmpf $file else echo \"$word\" not present fi + # some balancing for vim"s syntax highlighting } @@ -105,6 +102,7 @@ word=$1 word_quoted=${1//\//\\\/} + if $debug; then echo FILE: $file echo VAR: $var @@ -112,16 +110,26 @@ echo current content: grep "^$var=" $file | tail -n 1 echo - fi +if ! [ -r $file ]; then + echo ${0##*/}: file $file is not a readable file + exit 1 +fi + +lineno=$(find_last_occurrence $var $file) +if [ -z $lineno ]; then + echo ${0##*/}: variable $var does not occur in $file + exit 1 +fi + $debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX) if [ $action = add ]; then - add_word $word $word_quoted + add_word $word $word_quoted $lineno else - remove_word $word $word_quoted + remove_word $word $word_quoted $lineno fi $debug && rm -f $tmpf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org