.bashrc test syntax different between user and root

Bug #228747 reported by Christer Edwards
2
Affects Status Importance Assigned to Milestone
Ubuntu CD Images
Invalid
Undecided
Unassigned
base-files (Ubuntu)
Confirmed
Undecided
Unassigned
bash (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: bash

I will admit right off the bat that this is in no way a critical bug and is likely submitted by my OCD behavior.

In running a diff -u comparing the ~/.bashrc with the /root/.bashrc I notice that a test statement is handled, while accurately, using two formats.

26c19
< if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
---
> if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then

While both are perfectly functional it just stood out to me as inconsistent.

Revision history for this message
Mika Fischer (zoop) wrote :

Maybe someone can check if this is also the case on a fresh install...

Changed in bash:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I just commented on this in bug #121992. The /root/.bashrc on the live CD is old and not like the one in the installed bash package. This is actually serious, because when you install from the live CD with Ubiquity, this old file gets copied over to your new system, and you'll miss all the changes and bug fixes in .bashrc and .profile from the last year.

So it's not a bug in the bash package AFAICS, but in how the live CD is put together.

Revision history for this message
Colin Watson (cjwatson) wrote :

This has nothing to do with the CD image software; /root/.bashrc is populated by base-files.

Changed in ubuntu-cdimage:
status: New → Invalid
Revision history for this message
Tormod Volden (tormodvolden) wrote :

Right, duh, it is copied in the base-files.postinst (I couldn't find it with dpkg -S). But it must be a real bug that the .bashrc in base-files is not kept in sync with the .bashrc in bash, and not just a wishlist item? Why not let the base-files package build-dep on bash, and copy its bashrc at build-time?

Andreas Moog (ampelbein)
Changed in base-files:
status: New → Confirmed
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.