Config files in 39etc39 need updating

As an example, we select the configuration file Beginning of differences between /etc/and /etc/._cfg0000_[...] End of differences between /etc/and /etc/._cfg0000_1) Replace original with update 2) Delete update, keeping original as is 3) Interactively merge original with update 4) Show differences again .

There is no point in further elaborating the interactive merging here.

All configurations files managed by dpkg are called “conffiles” because that’s the name of the field where they are recorded in the dpkg database.

config files in 39etc39 need updating-72

The easy method is to ship a best-effort configuration in the package, and use 's conffile mechanism to handle updates.

If the user is unlikely to want to edit the file, but you need them to be able to without losing their changes, and a new package with a changed version of the file is only released infrequently, this is a good approach.

can do a certain amount of automatic handling of package configuration files.

Whether this mechanism is appropriate depends on a number of factors, but basically there are two approaches to any particular configuration file.

Dpkg keeps a checksum of the last installed version of configuration file.

When it must install a new version, it calculates the checksum of the currently installed file and if it doesn’t match anymore, it knows that the user has edited the file.The hard method is to build the configuration file from scratch in the script, and to take the responsibility for fixing any mistakes made in earlier versions of the package automatically.This will be appropriate if the file is likely to need to be different on each system. This file should be a list of filenames of configuration files needing automatic handling, separated by newlines. When you ran etc-update the first time, you would have seen something to the effect of "merging minor changes in ..." Minor changes means, as far as I know, changes to the two or three copyright comment lines at the beginning of a stock-standard config file and perhaps even other comments within the file. If there is something to do, etc-update will present you with a list of files that need updating and then provide a primitive interface to edit each one.Each person has there own way of actually editing the files, so I won't go into that.Multiple package instances within a single package slot have been pulled !!!

Tags: , ,