history doubling in root shell

Bug #515582 reported by Hendrik Lönngren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-files (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: base-files

I noticed that commands that are executed more than once in a root shell also appear more than once when using the arrow keys. That is clearly not desired behaviour. The default /root/.bashrc says this:

# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups

The bash skeleton in /etc/skel/.bashrc says:

# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth

This seems better. Googling around I found out that /root/.bashrc is copied from /usr/share/base-files/dot.bashrc (is that right?). The lines in question have been inserted into that file five years ago with the comment “sync with bash
  skeleton files”, where the export statement is commented out:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/base-files/lucid/revision/2/share/dot.bashrc

So maybe the “sync” step needs to be repeated. Related: bug 228747

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: base-files 5ubuntu4
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: base-files
Uname: Linux 2.6.30-020630rc5-generic i686

Revision history for this message
Hendrik Lönngren (hendrik0) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.