+2002-07-08 Robert Collins <rbtcollins@hotmail.com>
+
+ * install.cc (NoReplaceOnReboot): New command line option to prevent
+ replacing in use files.
+ (install_one_source): Check the option and use it.
+ * README: Update TODO lists.
+
2002-07-08 Robert Collins <rbtcollins@hotmail.com>
* PickCategoryLine.cc: Change bucket to use STL container syntax
* Src tickbox /source only can be confusing.
* Handle UNC paths for the localdir correctly.
* Chooser dialog needs work.
+ * A command line option to prevent overwrite-on-reboot functionality.
#include "md5.h"
#include "Exception.h"
+#include "getopt++/BoolOption.h"
extern ThreeBarProgressPage Progress;
static int total_bytes_sofar = 0;
static int package_bytes = 0;
+static BoolOption NoReplaceOnReboot (false, 'r', "no-replaceonreboot",
+ "Disable replacing in-use files on next "
+ "reboot.");
+
static void
init_dialog ()
{
log (LOG_BABBLE, String("Installing file ") + prefixURL + prefixPath + fn);
if (archive::extract_file (thefile, prefixURL, prefixPath) != 0)
{
+ if (NoReplaceOnReboot)
+ {
+ ++errors;
+ log (LOG_PLAIN, String("Not replacing in-use file ") +
+ prefixURL + prefixPath + fn);
+ }
+ else
//extract to temp location
if (archive::extract_file (thefile, prefixURL, prefixPath, ".new") != 0)
{