LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackpkg best practices (https://www.linuxquestions.org/questions/slackware-14/slackpkg-best-practices-4175510287/)

plisken 07-06-2014 12:01 PM

slackpkg best practices
 
A quick curiosity question here, re the use of slackpkg or indeed relevent to any package upgrading.

What do you tend to do with the config files, do you simply keep the old ones, or do you compare each config file for changes?

reason I ask is that I'm assuming most folk will have tweeked their config files for many packages and would want to keep those changes.

I personally almost always Keep the old files and leave lots of .new ones lying around but recently got to thinking "what if there were new features" requiring new parameters or settings in said new config files which my old trusty ones dont have.

Thanks for your comments

jstg 07-06-2014 11:16 PM

I've always used vimdiff to compare and merge any changes in the configuration files.

Code:

vimdiff current_file new_config_file
Code:

]c - Jump to next change
[c - Jump to previous change
do - Get changes from other window into the current window
dp - Put changes from current window into the other window

That's always worked out quite well for me.

dad_ 07-07-2014 01:06 AM

Quote:

Originally Posted by plisken (Post 5199551)
A quick curiosity question here, re the use of slackpkg or indeed relevent to any package upgrading.

What do you tend to do with the config files, do you simply keep the old ones, or do you compare each config file for changes?

reason I ask is that I'm assuming most folk will have tweeked their config files for many packages and would want to keep those changes.

I personally almost always Keep the old files and leave lots of .new ones lying around but recently got to thinking "what if there were new features" requiring new parameters or settings in said new config files which my old trusty ones dont have.

Thanks for your comments

I usually do diff per file and depending on the result:

1. merge(sometimes manually) new & old files in case of I have made some important changes
2. completely rewrite old files by the new ones if there are no changes I have made
3. leave old ones if there are many changes and I have no time to compare. But this approach is unsafe because the format of the file may have changed, or there are some required new options missing

You can always run
Code:

slackpkg new-config
and repeat the process of keep/merge/re-write per .new file.

ruario 07-07-2014 01:47 AM

If I am not updating from one stable version of Slackware to another Stable version of Slackware I only expect critical updates, which effectively means minor number software updates. Therefore the config files and options will not drastically change. I always check just to be sure but I almost always end up just deleting .new files in these cases.

In my experience, more often than not you only really have to deal with merging when you upgrading between Slackware releases.

a4z 07-07-2014 05:09 AM

overwrite if it is a file that I have not changed, what is mostly the case.
otherwise it depends, usually I do not care, if I accidental overwrite my config, I have a backup or did learn something :-)

BCarey 07-07-2014 04:10 PM

Quote:

Originally Posted by ruario (Post 5199801)
In my experience, more often than not you only really have to deal with merging when you upgrading between Slackware releases.

This has been my experience, too. I will sometimes look at the diff since slackpkg offers that convenience, but I nearly always (k)eep the old file if I have edited it.

Brian


All times are GMT -5. The time now is 09:09 PM.