This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit ca90fbfa7c020bc92cdec9f3b2cad9076626f7a0 Author: Guillem Jover <[email protected]> Date: Mon Apr 2 16:33:11 2018 +0200 dpkg-divert: Add new --no-rename option Document its intended usage and how it differs from --rename. This will make it possible to do a behavior switch during the 1.20.x release cycle. --- debian/changelog | 2 ++ man/dpkg-divert.man | 12 +++++++++++- src/divertcmd.c | 4 +++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9dfce80..ff6e56b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium * Switch all assert() calls (except in update-alternatives) into internerr() or BUG() calls, to get way better reporting with variable contents and descriptions, and to make them always present independent of NDEBUG. + * Add a new --no-rename option to dpkg-divert. This is the current default + behavior, but it will make it possible to do a default switch in 1.20.x. * Architecture support: - Add support for riscv64 CPU. Closes: #822914 Thanks to Manuel A. Fernandez Montecelo <[email protected]> diff --git a/man/dpkg-divert.man b/man/dpkg-divert.man index c9d7e1c..48fcc0c 100644 --- a/man/dpkg-divert.man +++ b/man/dpkg-divert.man @@ -3,7 +3,7 @@ .\" Copyright © 1995 Ian Jackson <[email protected]> .\" Copyright © 1999 Wichert Akkerman <[email protected]> .\" Copyright © 2004 Scott James Remnant <[email protected]> -.\" Copyright © 2007-2013, 2015 Guillem Jover <[email protected]> +.\" Copyright © 2007-2013, 2015-2018 Guillem Jover <[email protected]> .\" .\" This is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by @@ -88,6 +88,16 @@ Quiet mode, i.e. no verbose output. .B \-\-rename Actually move the file aside (or back). \fBdpkg\-divert\fP will abort operation in case the destination file already exists. +This is the common behavior used for diversions of files from the +non-\fBEssential\fP package set (see \fB\-\-no\-rename\fP for more details). +.TP +.B \-\-no\-rename +Specifies that the file should not be renamed while adding or removing the +diversion into the database (since dpkg 1.19.1). +This is intended for diversions of files from the \fBEssential\fP package set, +where the temporary disappearance of the original file is not acceptable, as +it can render the system non-functional. +This is the default behavior. .TP .B \-\-test Test mode, i.e. don't actually perform any changes, just demonstrate. diff --git a/src/divertcmd.c b/src/divertcmd.c index 6972e51..f5efb63 100644 --- a/src/divertcmd.c +++ b/src/divertcmd.c @@ -3,7 +3,7 @@ * * Copyright © 1995 Ian Jackson * Copyright © 2000, 2001 Wichert Akkerman - * Copyright © 2006-2014 Guillem Jover <[email protected]> + * Copyright © 2006-2015, 2017-2018 Guillem Jover <[email protected]> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <[email protected]> * @@ -101,6 +101,7 @@ usage(const struct cmdinfo *cip, const char *value) " --local all packages' versions are diverted.\n" " --divert <divert-to> the name used by other packages' versions.\n" " --rename actually move the file aside (or back).\n" +" --no-rename do not move the file aside (or back) (default).\n" " --admindir <directory> set the directory with the diversions file.\n" " --test don't do anything, just demonstrate.\n" " --quiet quiet operation, minimal output.\n" @@ -751,6 +752,7 @@ static const struct cmdinfo cmdinfos[] = { { "local", 0, 0, NULL, NULL, set_package }, { "quiet", 0, 0, &opt_verbose, NULL, NULL, 0 }, { "rename", 0, 0, &opt_rename, NULL, NULL, 1 }, + { "no-rename", 0, 0, &opt_rename, NULL, NULL, 0 }, { "test", 0, 0, &opt_test, NULL, NULL, 1 }, { "help", '?', 0, NULL, NULL, usage }, { "version", 0, 0, NULL, NULL, printversion }, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git

