configuration: add keepconf option

Add configuration option keepconf that stops xbps from overwriting
unchanged configuration files. If keepconf=true, xbps will store the new
configuration as <name>.new-<version> instead of overwriting unchanged
configuration files.
This commit is contained in:
Andreas Kempe
2020-01-24 23:09:12 +01:00
committed by Juan RP
parent 71a594f681
commit 02c9cb11c4
7 changed files with 115 additions and 5 deletions

View File

@@ -71,6 +71,20 @@
# preserve=/etc/file
# preserve=/etc/dir/*.conf
## PRESERVING CONFIGURATION
#
# The `keepconf` (disabled by default) keyword can be used to prevent
# xbps from overwriting configuration files.
#
# If set to false, xbps will overwrite configuration files if they
# have not been changed since installation and a newer version is
# available.
#
# If set to true, xbps will save the new configuration file as
# <name>.new-<version> if the original configuration file has not been
# changed since installation.
# keepconf=true
## VIRTUAL PACKAGES
#
# Virtual package overrides. You can set your own list of preferred virtual

View File

@@ -1,4 +1,4 @@
.Dd January 18, 2020
.Dd February 05, 2020
.Dt XBPS-D 5
.Sh NAME
.Nm xbps.d
@@ -84,6 +84,15 @@ Absolute path to a file and file globbing are supported, example:
.It Sy preserve=/usr/bin/foo
.It Sy preserve=/etc/foo/*.conf
.El
.It Sy keepconf=true|false
If set to false (default), xbps will overwrite configuration files if
they have not been changed since installation and a newer version is
available.
.Pp
If set to true, xbps will save the new configuration file as
<name>.new-<version> if the original configuration file has not been
changed since installation.
.Pp
.It Sy repository=url
Declares a package repository. The
.Ar url