xbps-install: make -f preserve conf files; use it twice to overwrite all files.
This commit is contained in:
@@ -47,7 +47,9 @@ usage(bool fail)
|
||||
" -C --config <file> Full path to configuration file\n"
|
||||
" -c --cachedir <dir> Full path to cachedir\n"
|
||||
" -d --debug Debug mode shown to stderr\n"
|
||||
" -f --force Force package installation\n"
|
||||
" -f --force Force package re-installation\n"
|
||||
" If specified twice, all files will be\n"
|
||||
" overwritten.\n"
|
||||
" -h --help Print help usage\n"
|
||||
" -n --dry-run Dry-run mode\n"
|
||||
" -R --repository <uri> Default repository to be used if config not set\n"
|
||||
@@ -84,7 +86,7 @@ main(int argc, char **argv)
|
||||
struct xbps_handle xh;
|
||||
struct xferstat xfer;
|
||||
const char *rootdir, *cachedir, *conffile, *defrepo;
|
||||
int i, c, flags, rv;
|
||||
int i, c, flags, rv, fflag = 0;
|
||||
bool sync, yes, reinstall, drun, update;
|
||||
size_t maxcols;
|
||||
|
||||
@@ -107,7 +109,9 @@ main(int argc, char **argv)
|
||||
flags |= XBPS_FLAG_DEBUG;
|
||||
break;
|
||||
case 'f':
|
||||
flags |= XBPS_FLAG_FORCE_INSTALL;
|
||||
fflag++;
|
||||
if (fflag > 1)
|
||||
flags |= XBPS_FLAG_FORCE_UNPACK;
|
||||
reinstall = true;
|
||||
break;
|
||||
case 'h':
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.Dd January 31, 2013
|
||||
.Dd February 2, 2013
|
||||
.Os Void Linux
|
||||
.Dt xbps-install 8
|
||||
.Sh NAME
|
||||
@@ -59,7 +59,12 @@ Specifies a full path to the cache directory, where binary packages are stored.
|
||||
Enables extra debugging shown to stderr.
|
||||
.It Fl f, Fl -force
|
||||
Forcefully install target package even if another version is already installed,
|
||||
overwritting its package files.
|
||||
overwritting regular package files and symlinks (if they have been modified) but
|
||||
.Em preserving configuration files .
|
||||
If
|
||||
.Fl f
|
||||
is specified twice,
|
||||
.Em configuration files will also be overwritten .
|
||||
.It Fl h, Fl -help
|
||||
Show the help usage.
|
||||
.It Fl n, Fl -dry-run
|
||||
|
Reference in New Issue
Block a user