Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263062 - app-shells/bash should update /etc/bash/bashrc on any bash-update as well
Summary: app-shells/bash should update /etc/bash/bashrc on any bash-update as well
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-19 18:05 UTC by Wilbur Pan
Modified: 2009-03-21 01:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbur Pan 2009-03-19 18:05:43 UTC
Installing bash-completion provides the file /etc/profile.d/bash-completion.sh.  The problem is, in the bashrc that bash provides, this statement is used for activating bash-completion:

======

# cat /etc/bash/bashrc 

# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !

   [snip]

# This is for bash-completion

[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion

=====

This caused an issue on my machine so that gentoo autocompletions were not working correctly.  Copying /etc/profile.d/bash-completion.sh to /etc/profile.d/bash-completion fixed this issue.

It seems to me that bash should provide a file named /etc/profile.d/bash-completion, or the bashrc needs to be changed to refer to /etc/profile.d/bash-completion.sh.


Reproducible: Always



Expected Results:  
There should be consistency between references to /etc/profile.d/bash-completion and /etc/profile.d/bash-completion.sh.

# emerge --info
Portage 2.2_rc26 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r3-i686-Intel-R-_Core-TM-2_CPU_4400_@_2.00GHz-with-glibc2.0
Timestamp of tree: Wed, 18 Mar 2009 19:15:02 +0000
app-shells/bash:     4.0_p10-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa artworkextra automount avahi bash-completion beagle berkdb bluetooth branding bzip2 cairo cdda cddb cdr cjk cleartype cli cracklib crypt cups curl dbus device-mapper dri dvd dvdr dvdread eds emboss encode epiphany esd exif fam ffmpeg flac fortran gd gdbm gif gnome gnome-keyring gnomecd gpm gs gstreamer gtk gtkhtml guile hal iconv inotify ipv6 isdnlog java jpeg keyring ldap libnotify loop-aes lzma lzo mad mdnsresponder-compat midi mikmod mmx mono mp3 mpeg mudflap nautilus ncurses networking nls nptlonly nsplugin offensive ogg opengl openmp pam pcre pdf perl png ppds pppd profile python quicktime readline reflection reiserfs rtc sdl session sound spell spl sse sse2 ssl startup-notification svg symlink sysfs tcpd threads tiff truetype unicode usb utils vorbis win32codecs x86 xattr xml xmp xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Wilbur Pan 2009-03-20 00:56:03 UTC
Okay - I did some more testing and it seems that the /etc/bash/bashrc file that I had was from a previous version of bash (app-shells/bash-4.0_p10-r1).  The current version of bash has a different /etc/bash/bashrc, without the code activating bash-completion that I quoted.

This still should be a bug, as it seems to me that if there are going to be changes to /etc/bash/bashrc, this file should be updated as bash gets updated.
Comment 2 Wilbur Pan 2009-03-20 00:58:50 UTC
Okay - I did some more testing and it seems that the /etc/bash/bashrc file that I had was from a previous version of bash.  The current version of bash ((app-shells/bash-4.0_p10-r1) has a different /etc/bash/bashrc, without the code activating bash-completion that I quoted.

This still should be a bug, as it seems to me that if there are going to be changes to /etc/bash/bashrc, this file should be updated as bash gets updated.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-20 23:50:57 UTC
Well /etc belongs to the CONFIG_PROTECT variable and so does any subdirectory of /etc which was not explicitly added to CONFIG_PROTECT_MASK variable.

I'm not sure this is a wise idea to let every bash-update overwrite that file without the intermediate step through etc-update which gives the user some kind of control about which files should be updated in /etc.

Let's see, what bash maintainers think about this.
Comment 4 Wilbur Pan 2009-03-21 00:12:53 UTC
Actually, etc-update was what I had in mind.  I don't know how I left that tidbit out of my previous comments, although the dual entry should show that I was having issues.

In any case, I don't recall etc-update giving me an option for updating /etc/bash/bashrc.
Comment 5 SpanKY gentoo-dev 2009-03-21 01:56:06 UTC
this is already fixed in bash-4