/* * Copyright (c) 2000, Red Hat, Inc. * Copyright (c) 2003, Robert Collins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * A copy of the GNU General Public License can be found at * http://www.gnu.org/ * * Originally Written by DJ Delorie * */ /* The purpose of this file is to install all the packages selected in the install list (in ini.h). Note that we use a separate thread to maintain the progress dialog, so we avoid the complexity of handling two tasks in one thread. We also create or update all the files in /etc/setup/\* and create the mount points. */ #include "getopt++/BoolOption.h" #include "LogFile.h" #include "win32.h" #include "commctrl.h" #include #include #include #include #include #include #include #include #include "ini.h" #include "resource.h" #include "dialog.h" #include "geturl.h" #include "state.h" #include "diskfull.h" #include "msg.h" #include "mount.h" #include "mount.h" #include "filemanip.h" #include "io_stream.h" #include "compress.h" #include "compress_gz.h" #include "archive.h" #include "archive_tar.h" #include "script.h" #include "find.h" #include "FindVisitor.h" #include "package_db.h" #include "package_meta.h" #include "package_version.h" #include "package_source.h" #include "threebar.h" #include "Exception.h" #include "processlist.h" extern ThreeBarProgressPage Progress; static off_t total_bytes = 0; static off_t total_bytes_sofar = 0; static off_t package_bytes = 0; static BoolOption NoReplaceOnReboot (false, 'r', "no-replaceonreboot", IDS_HELPTEXT_NO_REPLACEONREBOOT); static BoolOption NoWriteRegistry (false, '\0', "no-write-registry", IDS_HELPTEXT_NO_WRITE_REGISTRY); struct std_dirs_t { const char *name; mode_t mode; }; class PerpetualRemoveFindVisitor : public FindVisitor { public: PerpetualRemoveFindVisitor (std::vector