summarylogtreecommitdiffstats
path: root/mongodb-4.4.29-boost-1.86.patch
blob: a016bede802eec440266ee4e998e7526289cf105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
diff -ruNb a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp
--- a/src/mongo/db/initialize_server_global_state.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/db/initialize_server_global_state.cpp	2024-11-01 01:08:38.073856416 -0500
@@ -34,6 +34,7 @@
 #include "mongo/db/initialize_server_global_state.h"
 #include "mongo/db/initialize_server_global_state_gen.h"
 
+#include <boost/filesystem.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <fmt/format.h>
 #include <iostream>
@@ -346,7 +347,7 @@
                                             << "\" should name a file, not a directory.");
             }
 
-            if (!serverGlobalParams.logAppend && boost::filesystem::is_regular(absoluteLogpath)) {
+            if (!serverGlobalParams.logAppend && boost::filesystem::is_regular_file(absoluteLogpath)) {
                 std::string renameTarget = absoluteLogpath + "." + terseCurrentTime(false);
                 boost::system::error_code ec;
                 boost::filesystem::rename(absoluteLogpath, renameTarget, ec);
diff -ruNb a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp
--- a/src/mongo/db/startup_warnings_mongod.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/db/startup_warnings_mongod.cpp	2024-11-01 01:06:49.878493115 -0500
@@ -33,6 +33,7 @@
 
 #include "mongo/db/startup_warnings_mongod.h"
 
+#include <boost/filesystem.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <fstream>
 #ifndef _WIN32
diff -ruNb a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp	2024-11-01 01:04:21.923482627 -0500
@@ -55,7 +55,7 @@
     // if called without a fully qualified path it asserts; that makes mongoperf fail.
     // so make a warning. need a better solution longer term.
     // massert(40389, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
-    if (!file.has_branch_path()) {
+    if (!file.has_parent_path()) {
         LOGV2(22274,
               "warning flushMyDirectory couldn't find parent dir for file: {file}",
               "flushMyDirectory couldn't find parent dir for file",
@@ -64,7 +64,7 @@
     }
 
 
-    boost::filesystem::path dir = file.branch_path();  // parent_path in new boosts
+    boost::filesystem::path dir = file.parent_path();  // parent_path in new boosts
 
     LOGV2_DEBUG(22275, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
 
diff -ruNb a/src/mongo/db/storage/storage_engine_metadata.cpp b/src/mongo/db/storage/storage_engine_metadata.cpp
--- a/src/mongo/db/storage/storage_engine_metadata.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/db/storage/storage_engine_metadata.cpp	2024-11-01 01:04:21.956815340 -0500
@@ -220,7 +220,7 @@
     // if called without a fully qualified path it asserts; that makes mongoperf fail.
     // so make a warning. need a better solution longer term.
     // massert(13652, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
-    if (!file.has_branch_path()) {
+    if (!file.has_parent_path()) {
         LOGV2(22283,
               "warning flushMyDirectory couldn't find parent dir for file: {file}",
               "flushMyDirectory couldn't find parent dir for file",
@@ -229,7 +229,7 @@
     }
 
 
-    boost::filesystem::path dir = file.branch_path();  // parent_path in new boosts
+    boost::filesystem::path dir = file.parent_path();  // parent_path in new boosts
 
     LOGV2_DEBUG(22284, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
 
diff -ruNb a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
--- a/src/mongo/scripting/engine.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/scripting/engine.cpp	2024-11-01 01:05:46.739190003 -0500
@@ -33,6 +33,7 @@
 
 #include "mongo/scripting/engine.h"
 
+#include <boost/filesystem.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <cctype>
 
diff -ruNb a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp
--- a/src/mongo/shell/shell_utils_launcher.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/shell/shell_utils_launcher.cpp	2024-11-01 01:04:06.410437770 -0500
@@ -907,26 +907,26 @@
     boost::filesystem::directory_iterator i(from);
     while (i != end) {
         boost::filesystem::path p = *i;
-        if (p.leaf() == "metrics.interim" || p.leaf() == "metrics.interim.temp") {
+        if (p.filename() == "metrics.interim" || p.filename() == "metrics.interim.temp") {
             // Ignore any errors for metrics.interim* files as these may disappear during copy
             boost::system::error_code ec;
-            boost::filesystem::copy_file(p, to / p.leaf(), ec);
+            boost::filesystem::copy_file(p, to / p.filename(), ec);
             if (ec) {
                 LOGV2_INFO(22814,
                            "Skipping copying of file from '{from}' to "
                            "'{to}' due to: {error}",
                            "Skipping copying of file due to error"
                            "from"_attr = p.generic_string(),
-                           "to"_attr = (to / p.leaf()).generic_string(),
+                           "to"_attr = (to / p.filename()).generic_string(),
                            "error"_attr = ec.message());
             }
-        } else if (p.leaf() != "mongod.lock" && p.leaf() != "WiredTiger.lock") {
+        } else if (p.filename() != "mongod.lock" && p.filename() != "WiredTiger.lock") {
             if (boost::filesystem::is_directory(p)) {
-                boost::filesystem::path newDir = to / p.leaf();
+                boost::filesystem::path newDir = to / p.filename();
                 boost::filesystem::create_directory(newDir);
                 copyDir(p, newDir);
             } else {
-                boost::filesystem::copy_file(p, to / p.leaf());
+                boost::filesystem::copy_file(p, to / p.filename());
             }
         }
         ++i;
diff -ruNb a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h
--- a/src/mongo/shell/shell_utils_launcher.h	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/shell/shell_utils_launcher.h	2024-11-01 01:04:06.443770483 -0500
@@ -29,7 +29,7 @@
 
 #pragma once
 
-#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem.hpp>
 #include <map>
 #include <sstream>
 #include <string>
diff -ruNb a/src/mongo/util/boost_assert_shim.cpp b/src/mongo/util/boost_assert_shim.cpp
--- a/src/mongo/util/boost_assert_shim.cpp	2024-02-13 02:46:45.000000000 -0600
+++ b/src/mongo/util/boost_assert_shim.cpp	2024-11-01 14:35:42.920826528 -0500
@@ -32,6 +32,7 @@
 #if defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG)
 
 #include <boost/assert.hpp>
+#include <exception>
 
 namespace mongo {
 BoostAssertFuncs& BoostAssertFuncs::global() {