Bug 179025 - app-portage/cfg-update breaks backward compatibility when using /etc/profile
Bug#: 179025 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: trivial Priority: P2
Resolution: FIXED Assigned To: truedfx@gentoo.org Reported By: dpblnt@gmail.com
Component: Applications
URL: 
Summary: app-portage/cfg-update breaks backward compatibility when using /etc/profile
Keywords:  
Status Whiteboard: 
Opened: 2007-05-18 17:43 0000
Description:   Opened: 2007-05-18 17:43 0000
i don't have a .bashrc, thus i use cfg-update with ALIASFILE    = /etc/profile
after upgrading to cfg-update-1.8.2 i tried running cfg-update -u -a and got a
complaint about:
cfg-update -u -a
>>> cfg-update-1.8.2: Creating checksum index...
  /root/.bashrc not found!
  This file is important for properly setting up the root account.
  Created a pre-configured /root/.bashrc file for you...
  The bash shell will now load /etc/profile when you "su" to root...
  Now type: "source /root/.bashrc" to load it.


in my /etc/cfg-update.conf i still have ALIASFILE    = /etc/profile

Reproducible: Always

Steps to Reproduce:



Expected Results:  
to keep the old way working.

------- Comment #1 From Harald van Dijk 2007-05-18 17:58:06 0000 -------
Right, the checks for root's bashrc use ALIASFILE in one place, and are
hardcoded to /root/.bashrc in another. Stephan, would you mind changing that to
check ALIASFILE in both places?

------- Comment #2 From S. van Boven 2007-05-18 20:23:11 0000 -------
1. The alias_file variable is only used to check if the user still has the
alias enabled in the specified file. Because cfg-updat1.8.2 uses hooks, the
alias can be disabled!

2. The previous version of cfg-update had an option --on to set up the alias.
If the aliasfile was not found, the script would copy a preconfigured .bashrc
file to /root. That file contained the alias, but also another important line.
The line that sources /etc/profile when you log into your shell as root.

Now there is no need for the alias anymore, and the --on option has been
removed. But the script still copies a pre-configured /root/.bashrc, if it's
missing, to properly set up the root account. I never heard users complain
about this...

I'll change the script so it uses the alias_file variable in the check for
/root/.bashrc so if you set it to /etc/profile, it will not create a
/root/.bashrc anymore.

------- Comment #3 From S. van Boven 2007-05-18 21:05:30 0000 -------
uploaded the new 1.8.2-r1 tarball
with fixes for #179026 and #179025

------- Comment #4 From Harald van Dijk 2007-05-18 23:28:00 0000 -------
And fixed, thanks!