1 |
ultrabug 12/11/04 14:23:24 |
2 |
|
3 |
Added: mongodb-2.0-r1-boost-1.50.patch |
4 |
mongodb-2.2-r2-boost-1.50.patch |
5 |
Log: |
6 |
Fix boost-1.50 build #425190. Version bump, drop old, fix #441586. Get ready for #376983. |
7 |
|
8 |
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key B658FA13) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: mongodb-2.0-r1-boost-1.50.patch |
17 |
=================================================================== |
18 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/db.cpp mongodb-src-r2.0.6-patched/db/db.cpp |
19 |
--- mongodb-src-r2.0.6/db/db.cpp 2012-06-04 15:42:54.000000000 +0200 |
20 |
+++ mongodb-src-r2.0.6-patched/db/db.cpp 2012-07-10 22:27:16.496886220 +0200 |
21 |
@@ -326,7 +326,7 @@ |
22 |
boost::filesystem::path path( dbpath ); |
23 |
for ( boost::filesystem::directory_iterator i( path ); |
24 |
i != boost::filesystem::directory_iterator(); ++i ) { |
25 |
- string fileName = boost::filesystem::path(*i).leaf(); |
26 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
27 |
if ( boost::filesystem::is_directory( *i ) && |
28 |
fileName.length() && fileName[ 0 ] == '$' ) |
29 |
boost::filesystem::remove_all( *i ); |
30 |
@@ -655,11 +655,6 @@ |
31 |
dbExecCommand = argv[0]; |
32 |
|
33 |
srand(curTimeMicros()); |
34 |
-#if( BOOST_VERSION >= 104500 ) |
35 |
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
36 |
-#else |
37 |
- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
38 |
-#endif |
39 |
|
40 |
{ |
41 |
unsigned x = 0x12345678; |
42 |
@@ -976,7 +971,7 @@ |
43 |
if (params.count("shutdown")){ |
44 |
bool failed = false; |
45 |
|
46 |
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); |
47 |
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); |
48 |
if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 ) |
49 |
failed = true; |
50 |
|
51 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur.cpp mongodb-src-r2.0.6-patched/db/dur.cpp |
52 |
--- mongodb-src-r2.0.6/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200 |
53 |
+++ mongodb-src-r2.0.6-patched/db/dur.cpp 2012-07-10 21:56:28.866778732 +0200 |
54 |
@@ -692,7 +692,7 @@ |
55 |
|
56 |
bool samePartition = true; |
57 |
try { |
58 |
- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string(); |
59 |
+ const string dbpathDir = boost::filesystem::path(dbpath).string(); |
60 |
samePartition = onSamePartition(getJournalDir().string(), dbpathDir); |
61 |
} |
62 |
catch(...) { |
63 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_journal.cpp mongodb-src-r2.0.6-patched/db/dur_journal.cpp |
64 |
--- mongodb-src-r2.0.6/db/dur_journal.cpp 2012-06-04 15:42:54.000000000 +0200 |
65 |
+++ mongodb-src-r2.0.6-patched/db/dur_journal.cpp 2012-07-10 22:04:18.583472723 +0200 |
66 |
@@ -169,7 +169,7 @@ |
67 |
for ( boost::filesystem::directory_iterator i( getJournalDir() ); |
68 |
i != boost::filesystem::directory_iterator(); |
69 |
++i ) { |
70 |
- string fileName = boost::filesystem::path(*i).leaf(); |
71 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
72 |
if( str::startsWith(fileName, "j._") ) |
73 |
return true; |
74 |
} |
75 |
@@ -185,7 +185,7 @@ |
76 |
for ( boost::filesystem::directory_iterator i( getJournalDir() ); |
77 |
i != boost::filesystem::directory_iterator(); |
78 |
++i ) { |
79 |
- string fileName = boost::filesystem::path(*i).leaf(); |
80 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
81 |
if( str::startsWith(fileName, "j._") ) { |
82 |
try { |
83 |
removeOldJournalFile(*i); |
84 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_recover.cpp mongodb-src-r2.0.6-patched/db/dur_recover.cpp |
85 |
--- mongodb-src-r2.0.6/db/dur_recover.cpp 2012-06-04 15:42:54.000000000 +0200 |
86 |
+++ mongodb-src-r2.0.6-patched/db/dur_recover.cpp 2012-07-10 22:02:18.226799055 +0200 |
87 |
@@ -71,7 +71,7 @@ |
88 |
i != filesystem::directory_iterator(); |
89 |
++i ) { |
90 |
filesystem::path filepath = *i; |
91 |
- string fileName = filesystem::path(*i).leaf(); |
92 |
+ string fileName = filesystem::path(*i).leaf().string(); |
93 |
if( str::startsWith(fileName, "j._") ) { |
94 |
unsigned u = str::toUnsigned( str::after(fileName, '_') ); |
95 |
if( m.count(u) ) { |
96 |
@@ -84,7 +84,7 @@ |
97 |
if( i != m.begin() && m.count(i->first - 1) == 0 ) { |
98 |
uasserted(13532, |
99 |
str::stream() << "unexpected file in journal directory " << dir.string() |
100 |
- << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file"); |
101 |
+ << " : " << filesystem::path(i->second).leaf().string() << " : can't find its preceeding file"); |
102 |
} |
103 |
files.push_back(i->second); |
104 |
} |
105 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/instance.cpp mongodb-src-r2.0.6-patched/db/instance.cpp |
106 |
--- mongodb-src-r2.0.6/db/instance.cpp 2012-06-04 15:42:54.000000000 +0200 |
107 |
+++ mongodb-src-r2.0.6-patched/db/instance.cpp 2012-07-10 22:08:55.213488817 +0200 |
108 |
@@ -645,13 +645,13 @@ |
109 |
i != boost::filesystem::directory_iterator(); ++i ) { |
110 |
if ( directoryperdb ) { |
111 |
boost::filesystem::path p = *i; |
112 |
- string dbName = p.leaf(); |
113 |
+ string dbName = p.leaf().string(); |
114 |
p /= ( dbName + ".ns" ); |
115 |
if ( MMF::exists( p ) ) |
116 |
names.push_back( dbName ); |
117 |
} |
118 |
else { |
119 |
- string fileName = boost::filesystem::path(*i).leaf(); |
120 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
121 |
if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" ) |
122 |
names.push_back( fileName.substr( 0, fileName.length() - 3 ) ); |
123 |
} |
124 |
@@ -893,7 +893,7 @@ |
125 |
} |
126 |
|
127 |
void acquirePathLock(bool doingRepair) { |
128 |
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); |
129 |
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); |
130 |
|
131 |
bool oldFile = false; |
132 |
|
133 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/pdfile.cpp mongodb-src-r2.0.6-patched/db/pdfile.cpp |
134 |
--- mongodb-src-r2.0.6/db/pdfile.cpp 2012-06-04 15:42:54.000000000 +0200 |
135 |
+++ mongodb-src-r2.0.6-patched/db/pdfile.cpp 2012-07-10 22:11:44.103498643 +0200 |
136 |
@@ -1987,7 +1987,7 @@ |
137 |
virtual bool apply( const Path &p ) { |
138 |
if ( !boost::filesystem::exists( p ) ) |
139 |
return false; |
140 |
- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) ); |
141 |
+ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) ); |
142 |
return true; |
143 |
} |
144 |
virtual const char * op() const { |
145 |
@@ -2093,7 +2093,7 @@ |
146 |
uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ? |
147 |
"backup" : "$tmp" ); |
148 |
BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) ); |
149 |
- string reservedPathString = reservedPath.native_directory_string(); |
150 |
+ string reservedPathString = reservedPath.string(); |
151 |
|
152 |
bool res; |
153 |
{ |
154 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/dbtests/framework.cpp mongodb-src-r2.0.6-patched/dbtests/framework.cpp |
155 |
--- mongodb-src-r2.0.6/dbtests/framework.cpp 2012-06-04 15:42:54.000000000 +0200 |
156 |
+++ mongodb-src-r2.0.6-patched/dbtests/framework.cpp 2012-07-10 22:29:20.610226773 +0200 |
157 |
@@ -281,7 +281,7 @@ |
158 |
boost::filesystem::create_directory(p); |
159 |
} |
160 |
|
161 |
- string dbpathString = p.native_directory_string(); |
162 |
+ string dbpathString = p.string(); |
163 |
dbpath = dbpathString.c_str(); |
164 |
|
165 |
cmdLine.prealloc = false; |
166 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/pch.h mongodb-src-r2.0.6-patched/pch.h |
167 |
--- mongodb-src-r2.0.6/pch.h 2012-06-04 15:42:54.000000000 +0200 |
168 |
+++ mongodb-src-r2.0.6-patched/pch.h 2012-07-10 21:35:57.133373738 +0200 |
169 |
@@ -79,7 +79,7 @@ |
170 |
//#include <boost/any.hpp> |
171 |
#include "boost/thread/once.hpp" |
172 |
//#include <boost/archive/iterators/transform_width.hpp> |
173 |
-#define BOOST_FILESYSTEM_VERSION 2 |
174 |
+#define BOOST_FILESYSTEM_VERSION 3 |
175 |
#include <boost/filesystem/convenience.hpp> |
176 |
#include <boost/filesystem/exception.hpp> |
177 |
#include <boost/filesystem/operations.hpp> |
178 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/shell/shell_utils.cpp mongodb-src-r2.0.6-patched/shell/shell_utils.cpp |
179 |
--- mongodb-src-r2.0.6/shell/shell_utils.cpp 2012-06-04 15:42:54.000000000 +0200 |
180 |
+++ mongodb-src-r2.0.6-patched/shell/shell_utils.cpp 2012-07-10 22:38:58.443593723 +0200 |
181 |
@@ -388,7 +388,7 @@ |
182 |
#endif |
183 |
} |
184 |
|
185 |
- argv_.push_back( programPath.native_file_string() ); |
186 |
+ argv_.push_back( programPath.string() ); |
187 |
|
188 |
port_ = -1; |
189 |
|
190 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/restore.cpp mongodb-src-r2.0.6-patched/tools/restore.cpp |
191 |
--- mongodb-src-r2.0.6/tools/restore.cpp 2012-06-04 15:42:54.000000000 +0200 |
192 |
+++ mongodb-src-r2.0.6-patched/tools/restore.cpp 2012-07-10 22:45:00.046948094 +0200 |
193 |
@@ -131,7 +131,7 @@ |
194 |
log(2) << "drillDown: " << root.string() << endl; |
195 |
|
196 |
// skip hidden files and directories |
197 |
- if (root.leaf()[0] == '.' && root.leaf() != ".") |
198 |
+ if (root.leaf().string()[0] == '.' && root.leaf().string() != ".") |
199 |
return; |
200 |
|
201 |
if ( is_directory( root ) ) { |
202 |
@@ -210,7 +210,7 @@ |
203 |
ns += "." + _coll; |
204 |
} |
205 |
else { |
206 |
- string l = root.leaf(); |
207 |
+ string l = root.leaf().string(); |
208 |
l = l.substr( 0 , l.find_last_of( "." ) ); |
209 |
ns += "." + l; |
210 |
} |
211 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/tool.cpp mongodb-src-r2.0.6-patched/tools/tool.cpp |
212 |
--- mongodb-src-r2.0.6/tools/tool.cpp 2012-06-04 15:42:54.000000000 +0200 |
213 |
+++ mongodb-src-r2.0.6-patched/tools/tool.cpp 2012-07-10 22:23:53.356874403 +0200 |
214 |
@@ -113,12 +113,6 @@ |
215 |
// we want durability to be disabled. |
216 |
cmdLine.dur = false; |
217 |
|
218 |
-#if( BOOST_VERSION >= 104500 ) |
219 |
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
220 |
-#else |
221 |
- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
222 |
-#endif |
223 |
- |
224 |
_name = argv[0]; |
225 |
|
226 |
/* using the same style as db.cpp */ |
227 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/background.cpp mongodb-src-r2.0.6-patched/util/background.cpp |
228 |
--- mongodb-src-r2.0.6/util/background.cpp 2012-06-04 15:42:54.000000000 +0200 |
229 |
+++ mongodb-src-r2.0.6-patched/util/background.cpp 2012-07-10 21:47:40.420081320 +0200 |
230 |
@@ -89,7 +89,7 @@ |
231 |
if ( msTimeOut ) { |
232 |
// add msTimeOut millisecond to current time |
233 |
boost::xtime xt; |
234 |
- boost::xtime_get( &xt, boost::TIME_UTC ); |
235 |
+ boost::xtime_get( &xt, boost::TIME_UTC_ ); |
236 |
|
237 |
unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano |
238 |
if ( xt.nsec + ns < 1000000000 ) { |
239 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/concurrency/mutex.h mongodb-src-r2.0.6-patched/util/concurrency/mutex.h |
240 |
--- mongodb-src-r2.0.6/util/concurrency/mutex.h 2012-06-04 15:42:54.000000000 +0200 |
241 |
+++ mongodb-src-r2.0.6-patched/util/concurrency/mutex.h 2012-07-10 21:45:51.333408307 +0200 |
242 |
@@ -29,7 +29,7 @@ |
243 |
|
244 |
inline boost::xtime incxtimemillis( long long s ) { |
245 |
boost::xtime xt; |
246 |
- boost::xtime_get(&xt, boost::TIME_UTC); |
247 |
+ boost::xtime_get(&xt, boost::TIME_UTC_); |
248 |
xt.sec += (int)( s / 1000 ); |
249 |
xt.nsec += (int)(( s % 1000 ) * 1000000); |
250 |
if ( xt.nsec >= 1000000000 ) { |
251 |
diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/queue.h mongodb-src-r2.0.6-patched/util/queue.h |
252 |
--- mongodb-src-r2.0.6/util/queue.h 2012-06-04 15:42:54.000000000 +0200 |
253 |
+++ mongodb-src-r2.0.6-patched/util/queue.h 2012-07-10 22:14:00.243506560 +0200 |
254 |
@@ -82,7 +82,7 @@ |
255 |
Timer timer; |
256 |
|
257 |
boost::xtime xt; |
258 |
- boost::xtime_get(&xt, boost::TIME_UTC); |
259 |
+ boost::xtime_get(&xt, boost::TIME_UTC_); |
260 |
xt.sec += maxSecondsToWait; |
261 |
|
262 |
scoped_lock l( _lock ); |
263 |
|
264 |
|
265 |
|
266 |
1.1 dev-db/mongodb/files/mongodb-2.2-r2-boost-1.50.patch |
267 |
|
268 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.2-r2-boost-1.50.patch?rev=1.1&view=markup |
269 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/mongodb/files/mongodb-2.2-r2-boost-1.50.patch?rev=1.1&content-type=text/plain |
270 |
|
271 |
Index: mongodb-2.2-r2-boost-1.50.patch |
272 |
=================================================================== |
273 |
--- a/src/mongo/db/db.cpp 2012-08-28 08:28:11.000000000 +0300 |
274 |
+++ b/src/mongo/db/db.cpp 2012-10-21 18:25:50.000000000 +0300 |
275 |
@@ -348,7 +348,7 @@ |
276 |
boost::filesystem::path path( dbpath ); |
277 |
for ( boost::filesystem::directory_iterator i( path ); |
278 |
i != boost::filesystem::directory_iterator(); ++i ) { |
279 |
- string fileName = boost::filesystem::path(*i).leaf(); |
280 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
281 |
if ( boost::filesystem::is_directory( *i ) && |
282 |
fileName.length() && fileName[ 0 ] == '$' ) |
283 |
boost::filesystem::remove_all( *i ); |
284 |
@@ -748,11 +748,11 @@ |
285 |
dbExecCommand = argv[0]; |
286 |
|
287 |
srand(curTimeMicros()); |
288 |
-#if( BOOST_VERSION >= 104500 ) |
289 |
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
290 |
-#else |
291 |
- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
292 |
-#endif |
293 |
+// #if( BOOST_VERSION >= 104500 ) |
294 |
+// boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
295 |
+// #else |
296 |
+// boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
297 |
+// #endif |
298 |
|
299 |
{ |
300 |
unsigned x = 0x12345678; |
301 |
@@ -1083,7 +1083,7 @@ |
302 |
if (params.count("shutdown")){ |
303 |
bool failed = false; |
304 |
|
305 |
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); |
306 |
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); |
307 |
if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 ) |
308 |
failed = true; |
309 |
|
310 |
--- a/src/mongo/db/dur.cpp 2012-08-28 08:28:11.000000000 +0300 |
311 |
+++ b/src/mongo/db/dur.cpp 2012-10-21 18:25:50.000000000 +0300 |
312 |
@@ -770,7 +770,7 @@ |
313 |
|
314 |
bool samePartition = true; |
315 |
try { |
316 |
- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string(); |
317 |
+ const string dbpathDir = boost::filesystem::path(dbpath).string(); |
318 |
samePartition = onSamePartition(getJournalDir().string(), dbpathDir); |
319 |
} |
320 |
catch(...) { |
321 |
--- a/src/mongo/db/dur_journal.cpp 2012-08-28 08:28:11.000000000 +0300 |
322 |
+++ b/src/mongo/db/dur_journal.cpp 2012-10-21 18:25:50.000000000 +0300 |
323 |
@@ -176,7 +176,7 @@ |
324 |
for ( boost::filesystem::directory_iterator i( getJournalDir() ); |
325 |
i != boost::filesystem::directory_iterator(); |
326 |
++i ) { |
327 |
- string fileName = boost::filesystem::path(*i).leaf(); |
328 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
329 |
if( anyFiles || str::startsWith(fileName, "j._") ) |
330 |
return true; |
331 |
} |
332 |
@@ -194,7 +194,7 @@ |
333 |
for ( boost::filesystem::directory_iterator i( getJournalDir() ); |
334 |
i != boost::filesystem::directory_iterator(); |
335 |
++i ) { |
336 |
- string fileName = boost::filesystem::path(*i).leaf(); |
337 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
338 |
if( str::startsWith(fileName, "j._") ) { |
339 |
try { |
340 |
removeOldJournalFile(*i); |
341 |
--- a/src/mongo/db/dur_recover.cpp 2012-08-28 08:28:11.000000000 +0300 |
342 |
+++ b/src/mongo/db/dur_recover.cpp 2012-10-21 18:25:50.000000000 +0300 |
343 |
@@ -72,7 +72,7 @@ |
344 |
i != boost::filesystem::directory_iterator(); |
345 |
++i ) { |
346 |
boost::filesystem::path filepath = *i; |
347 |
- string fileName = boost::filesystem::path(*i).leaf(); |
348 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
349 |
if( str::startsWith(fileName, "j._") ) { |
350 |
unsigned u = str::toUnsigned( str::after(fileName, '_') ); |
351 |
if( m.count(u) ) { |
352 |
@@ -85,7 +85,7 @@ |
353 |
if( i != m.begin() && m.count(i->first - 1) == 0 ) { |
354 |
uasserted(13532, |
355 |
str::stream() << "unexpected file in journal directory " << dir.string() |
356 |
- << " : " << boost::filesystem::path(i->second).leaf() << " : can't find its preceeding file"); |
357 |
+ << " : " << boost::filesystem::path(i->second).leaf().string() << " : can't find its preceeding file"); |
358 |
} |
359 |
files.push_back(i->second); |
360 |
} |
361 |
--- a/src/mongo/db/instance.cpp 2012-08-28 08:28:11.000000000 +0300 |
362 |
+++ b/work/mongodb-src-r2.2.0/src/mongo/db/instance.cpp 2012-10-21 18:25:50.000000000 +0300 |
363 |
@@ -833,13 +833,13 @@ |
364 |
i != boost::filesystem::directory_iterator(); ++i ) { |
365 |
if ( directoryperdb ) { |
366 |
boost::filesystem::path p = *i; |
367 |
- string dbName = p.leaf(); |
368 |
+ string dbName = p.leaf().string(); |
369 |
p /= ( dbName + ".ns" ); |
370 |
if ( exists( p ) ) |
371 |
names.push_back( dbName ); |
372 |
} |
373 |
else { |
374 |
- string fileName = boost::filesystem::path(*i).leaf(); |
375 |
+ string fileName = boost::filesystem::path(*i).leaf().string(); |
376 |
if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" ) |
377 |
names.push_back( fileName.substr( 0, fileName.length() - 3 ) ); |
378 |
} |
379 |
@@ -1102,7 +1102,7 @@ |
380 |
} |
381 |
|
382 |
void acquirePathLock(bool doingRepair) { |
383 |
- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); |
384 |
+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); |
385 |
|
386 |
bool oldFile = false; |
387 |
|
388 |
--- a/src/mongo/db/pdfile.cpp 2012-08-28 08:28:11.000000000 +0300 |
389 |
+++ b/src/mongo/db/pdfile.cpp 2012-10-21 18:25:50.000000000 +0300 |
390 |
@@ -1675,7 +1675,7 @@ |
391 |
virtual bool apply( const Path &p ) { |
392 |
if ( !boost::filesystem::exists( p ) ) |
393 |
return false; |
394 |
- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) ); |
395 |
+ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) ); |
396 |
return true; |
397 |
} |
398 |
virtual const char * op() const { |
399 |
@@ -1783,7 +1783,7 @@ |
400 |
uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ? |
401 |
"backup" : "_tmp" ); |
402 |
MONGO_ASSERT_ON_EXCEPTION( boost::filesystem::create_directory( reservedPath ) ); |
403 |
- string reservedPathString = reservedPath.native_directory_string(); |
404 |
+ string reservedPathString = reservedPath.string(); |
405 |
|
406 |
bool res; |
407 |
{ |
408 |
--- a/src/mongo/dbtests/framework.cpp 2012-08-28 08:28:11.000000000 +0300 |
409 |
+++ b/src/mongo/dbtests/framework.cpp 2012-10-21 18:25:50.000000000 +0300 |
410 |
@@ -199,7 +199,7 @@ |
411 |
boost::filesystem::create_directory(p); |
412 |
} |
413 |
|
414 |
- string dbpathString = p.native_directory_string(); |
415 |
+ string dbpathString = p.string(); |
416 |
dbpath = dbpathString.c_str(); |
417 |
|
418 |
cmdLine.prealloc = false; |
419 |
--- a/src/mongo/pch.h 2012-08-28 08:28:11.000000000 +0300 |
420 |
+++ b/src/mongo/pch.h 2012-10-21 18:25:50.000000000 +0300 |
421 |
@@ -44,7 +44,7 @@ |
422 |
#include "string.h" |
423 |
#include "limits.h" |
424 |
|
425 |
-#define BOOST_FILESYSTEM_VERSION 2 |
426 |
+#define BOOST_FILESYSTEM_VERSION 3 |
427 |
#include <boost/shared_ptr.hpp> |
428 |
#include <boost/smart_ptr.hpp> |
429 |
#include <boost/function.hpp> |
430 |
--- a/src/mongo/shell/shell_utils_launcher.cpp 2012-08-28 08:28:11.000000000 +0300 |
431 |
+++ b/src/mongo/shell/shell_utils_launcher.cpp 2012-10-21 18:25:50.000000000 +0300 |
432 |
@@ -184,7 +184,7 @@ |
433 |
} |
434 |
#endif |
435 |
|
436 |
- _argv.push_back( programPath.native_file_string() ); |
437 |
+ _argv.push_back( programPath.string() ); |
438 |
|
439 |
_port = -1; |
440 |
|
441 |
--- a/src/mongo/tools/restore.cpp 2012-08-28 08:28:11.000000000 +0300 |
442 |
+++ b/src/mongo/tools/restore.cpp 2012-10-21 18:25:50.000000000 +0300 |
443 |
@@ -174,7 +174,7 @@ |
444 |
log(2) << "drillDown: " << root.string() << endl; |
445 |
|
446 |
// skip hidden files and directories |
447 |
- if (root.leaf()[0] == '.' && root.leaf() != ".") |
448 |
+ if (root.leaf().string()[0] == '.' && root.leaf() != ".") |
449 |
return; |
450 |
|
451 |
if ( is_directory( root ) ) { |
452 |
@@ -255,7 +255,7 @@ |
453 |
|
454 |
verify( ns.size() ); |
455 |
|
456 |
- string oldCollName = root.leaf(); // Name of the collection that was dumped from |
457 |
+ string oldCollName = root.leaf().string(); // Name of the collection that was dumped from |
458 |
oldCollName = oldCollName.substr( 0 , oldCollName.find_last_of( "." ) ); |
459 |
if (use_coll) { |
460 |
ns += "." + _coll; |
461 |
@@ -287,7 +287,7 @@ |
462 |
if (!boost::filesystem::exists(metadataFile.string())) { |
463 |
// This is fine because dumps from before 2.1 won't have a metadata file, just print a warning. |
464 |
// System collections shouldn't have metadata so don't warn if that file is missing. |
465 |
- if (!startsWith(metadataFile.leaf(), "system.")) { |
466 |
+ if (!startsWith(metadataFile.leaf().string(), "system.")) { |
467 |
log() << metadataFile.string() << " not found. Skipping." << endl; |
468 |
} |
469 |
} else { |
470 |
--- a/src/mongo/tools/tool.cpp 2012-08-28 08:28:11.000000000 +0300 |
471 |
+++ b/src/mongo/tools/tool.cpp 2012-10-21 18:25:50.000000000 +0300 |
472 |
@@ -118,11 +118,11 @@ |
473 |
// we want durability to be disabled. |
474 |
cmdLine.dur = false; |
475 |
|
476 |
-#if( BOOST_VERSION >= 104500 ) |
477 |
- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
478 |
-#else |
479 |
- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
480 |
-#endif |
481 |
+// #if( BOOST_VERSION >= 104500 ) |
482 |
+// boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); |
483 |
+// #else |
484 |
+// boost::filesystem::path::default_name_check( boost::filesystem::no_check ); |
485 |
+// #endif |
486 |
|
487 |
_name = argv[0]; |