Bug 169363 - catalyst-2.0.3_pre2 removes # from beginning of all lines in rc.conf
Bug#: 169363 Product:  Gentoo Hosted Projects Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: catalyst@gentoo.org Reported By: agaffney@gentoo.org
Component: Catalyst
URL: 
Summary: catalyst-2.0.3_pre2 removes # from beginning of all lines in rc.conf
Keywords:  InSVN
Status Whiteboard: 
Opened: 2007-03-04 20:54 0000
Description:   Opened: 2007-03-04 20:54 0000
The sed statement that sets DISPLAYMANAGER in rc.conf in
targets/support/livecdfs-update.sh is a bit off:

sed -i \
  -e "s:DISPLAYMANAGER=\"xdm\":DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
  -e ":^DISPLAYMANAGER: s:^#::" \
  /etc/rc.conf

The first regex in the 2nd part of the command is ignored since it's not
wrapped in / /. This causes sed to remove # from the beginning of all lines in
rc.conf.

------- Comment #1 From Andrew Gaffney 2007-03-04 20:54:35 0000 -------
Created an attachment (id=112115) [details]
patch to fix the problem

------- Comment #2 From Andrew Gaffney 2007-03-04 20:56:47 0000 -------
The patch merges the two parts into a single regex that takes care of an
existing DISPLAYMANAGER line with or without a beginning #. It also handles the
case of the default possibly changing from "xdm" in the future. I made the same
modification to the sed statement for /etc/conf.d/xdm.

------- Comment #3 From Andrew Gaffney 2007-03-04 21:09:47 0000 -------
I just re-ran livecd-stage2 with my patch, and it appears that both rc.conf and
conf.d/xdm were modified properly. Also, it appears that the current sed
statement doesn't work with / /, either. Perhaps it's the space between the 2
parts of the second statement. Whatever... :P

------- Comment #4 From Chris Gianelloni (RETIRED) 2007-03-06 17:41:17 0000 -------
Fixed in SVN/2.0.3_pre3

------- Comment #5 From Chris Gianelloni (RETIRED) 2007-03-20 17:17:24 0000 -------
This is fixed in 2.0.3 which should be hitting the tree shortly.