Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69845 - make etc-update list of to be update less cluttered
Summary: make etc-update list of to be update less cluttered
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 93874
Blocks: 115839
  Show dependency tree
 
Reported: 2004-11-02 08:13 UTC by Tom Hosiawa
Modified: 2006-04-23 14:12 UTC (History)
1 user (show)

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


Attachments
etc-update.diff (etc-update.diff,267 bytes, patch)
2004-11-02 08:15 UTC, Tom Hosiawa
Details | Diff
etc-update2.diff (etc-update2.diff,652 bytes, patch)
2004-12-29 04:23 UTC, David Cooper
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hosiawa 2004-11-02 08:13:48 UTC
When I have a huge list of config files to update, it's hard to choose the file I want to edit because all the files are listed one following another without any seperation. It's just too cluttered.

For example:
1) /etc/crontab
/etc/._cfg0000_crontab
2) /etc/apache2/conf/apache2.conf
/etc/apache2/conf/._cfg0000_apache2.conf
3) /etc/apache2/conf/commonapache2.conf
/etc/apache2/conf/._cfg0000_commonapache2.conf
4) /etc/conf.d/apache2
/etc/conf.d/._cfg0000_apache2
5) /etc/conf.d/nfs
/etc/conf.d/._cfg0000_nfs
6) /etc/conf.d/pcmcia
/etc/conf.d/._cfg0000_pcmcia
7) /etc/init.d/nfs
/etc/init.d/._cfg0000_nfs
8) /etc/init.d/nfsmount
/etc/init.d/._cfg0000_nfsmount
9) /etc/init.d/smartd
/etc/init.d/._cfg0000_smartd
10) /etc/init.d/vixie-cron
/etc/init.d/._cfg0000_vixie-cron
11) /etc/pcmcia/network.opts
/etc/pcmcia/._cfg0000_network.opts
12) /etc/pcmcia/wireless.opts
/etc/pcmcia/._cfg0000_wireless.opts
13) /etc/postfix/main.cf
/etc/postfix/._cfg0000_main.cf
14) /etc/postfix/master.cf
/etc/postfix/._cfg0000_master.cf
15) /etc/samba/smb.conf
/etc/samba/._cfg0000_smb.conf
16) /etc/samba/smb.conf.example.gz
/etc/samba/._cfg0000_smb.conf.example.gz
17) /etc/ssl/postfix/server.crt
/etc/ssl/postfix/._cfg0000_server.crt
18) /etc/ssl/postfix/server.csr
/etc/ssl/postfix/._cfg0000_server.csr
19) /etc/ssl/postfix/server.key
/etc/ssl/postfix/._cfg0000_server.key
20) /etc/ssl/postfix/server.pem
/etc/ssl/postfix/._cfg0000_server.pem

Instead, I purpose making it look less cluttered by placing a newline between each config file like this:
1) /etc/crontab
/etc/._cfg0000_crontab

2) /etc/apache2/conf/apache2.conf
/etc/apache2/conf/._cfg0000_apache2.conf

3) /etc/apache2/conf/commonapache2.conf
/etc/apache2/conf/._cfg0000_commonapache2.conf

4) /etc/conf.d/apache2
/etc/conf.d/._cfg0000_apache2

5) /etc/conf.d/nfs
/etc/conf.d/._cfg0000_nfs

Reproducible: Always
Steps to Reproduce:
Comment 1 Tom Hosiawa 2004-11-02 08:15:19 UTC
Created attachment 43170 [details, diff]
etc-update.diff
Comment 2 David Cooper 2004-12-29 04:23:05 UTC
Created attachment 47099 [details, diff]
etc-update2.diff

An alternative idea is to not display the ._cfg* files. The listing is more
concise that way.

Attached is a different patch to the etc-update script which adds the
configuration option "show_update_files". If this is set to "yes" in
/etc/etc-update.conf then etc-update behaves as it currently does. Otherwise,
the ._cfg* files are omitted.
Comment 3 Tom Hosiawa 2004-12-29 08:02:58 UTC
I like David's suggestion. There really is no need to show both files since their the same location with the exception the new ones start with '.'.
Comment 4 Simon Stelling (RETIRED) gentoo-dev 2006-04-13 09:25:17 UTC
etc-update now (r3138) doesn't show the ._cfg???? files anymore but instead the number of updates in parenthesis:

 # etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/resolv.conf (2)
Please select a file to edit by entering the corresponding number.
              (don't use -3 or -5 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all remaining files)
                           (-5 to auto-merge AND not use 'mv -i'): 

instead of

# etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/resolv.conf
   /etc/._cfg0000_resolv.conf
   /etc/._cfg0001_resolv.conf
Please select a file to edit by entering the corresponding number.
              (don't use -3 or -5 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all remaining files)
                           (-5 to auto-merge AND not use 'mv -i'):

Think that fixes this bug :)
Comment 5 Zac Medico gentoo-dev 2006-04-17 01:04:37 UTC
Released in 2.1_pre9.
Comment 6 Joe Wells 2006-04-23 14:12:04 UTC
Yes, much nicer, thanks very much!