Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37815975
en ru br
ALT Linux repos
S:0.2.3-alt9

Group :: System/Configuration/Boot and Init
RPM: e4rat

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: e4rat-0.2.3-alt-use-boost-filesystem-v3.patch
Download


diff --git a/e4rat/CMakeLists.txt b/e4rat/CMakeLists.txt
index e6de8d2..5291be7 100644
--- a/e4rat/CMakeLists.txt
+++ b/e4rat/CMakeLists.txt
@@ -16,8 +16,8 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
 
 set(Boost_USE_STATIC_LIBS   ON)
 set(Boost_USE_MULTITHREADED OFF)
-add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
-find_package(Boost 1.41 COMPONENTS system filesystem regex REQUIRED)
+add_definitions(-DBOOST_FILESYSTEM_VERSION=3)
+find_package(Boost 1.51 COMPONENTS system filesystem regex REQUIRED)
 set(${PROJECT_NAME}_LIBRARIES   ${${PROJECT_NAME}_LIBRARIES}
     ${Boost_LIBRARIES})
 set(Boost_VERSION_STR  "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
diff --git a/e4rat/src/common.cc b/e4rat/src/common.cc
index 9fba13a..1af8817 100644
--- a/e4rat/src/common.cc
+++ b/e4rat/src/common.cc
@@ -157,7 +157,7 @@ std::vector<std::string> matchPath( const std::string & filesearch )
         p /= filesearch;
     }
     // Initialize regex filter - use * as default if nothing is given in filesearch
-    std::string f( p.has_filename() ? p.filename() : "*");
+    std::string f( p.has_filename() ? p.filename().string() : "*");
 
     fs::path dir(system_complete(p).parent_path());
     if( is_directory(dir) )
@@ -166,8 +166,9 @@ std::vector<std::string> matchPath( const std::string & filesearch )
              it!=boost::filesystem::directory_iterator();
              ++it )
         {
-            if( boost::regex_match( it->leaf(), path2regex(f) ) )
-                fileset.push_back(it->string());
+            const boost::filesystem::path& dp = it->path();
+            if( boost::regex_match( dp.filename().string(), path2regex(f) ) )
+                fileset.push_back(dp.string());
         }
     return fileset;
 }
diff --git a/e4rat/src/config.cc b/e4rat/src/config.cc
index 5671fb4..8841c5d 100644
--- a/e4rat/src/config.cc
+++ b/e4rat/src/config.cc
@@ -71,7 +71,7 @@ Config::Config()
         return;
     }
     
-    tool_name = fs::path(argv[0]).filename();
+    tool_name = fs::path(argv[0]).filename().string();
     found = tool_name.find_last_of("-");
     if(found)
         defaultSection = tool_name.substr(found+1);
diff --git a/e4rat/src/device.cc b/e4rat/src/device.cc
index 4ac6e73..fea5c51 100644
--- a/e4rat/src/device.cc
+++ b/e4rat/src/device.cc
@@ -196,13 +196,14 @@ int Device::getDevNameFromDevfs()
         it != end_itr;
         ++it )
     {
-        if(it->filename() == "root")
+        const fs::path& p = it->path();
+        if(p.filename() == "root")
             continue;
-        if(lstat(it->string().c_str(), &st))
+        if(lstat(p.string().c_str(), &st))
             continue;
         if(st.st_rdev == get()->devno)
         {
-            get()->deviceName = it->filename();
+            get()->deviceName = p.filename().string();
             get()->devicePath = "/dev/" + get()->deviceName;
             return 0;
         }
@@ -225,7 +226,7 @@ int Device::getDevNameFromMajorMinor()
             // the minor number of virtual filesystems are allocated dynamically in function set_anon_super() in fs/super.c
             // for convenience set deviceName and devicePath to a common name
             get()->deviceName = "virtual file system";
-            get()->devicePath = get()->mount_point.filename();
+            get()->devicePath = get()->mount_point.filename().string();
             return 0;
         case 2:
             ss << "fd"; 
diff --git a/e4rat/src/e4rat-collect.cc b/e4rat/src/e4rat-collect.cc
index 8cc2b81..455057c 100644
--- a/e4rat/src/e4rat-collect.cc
+++ b/e4rat/src/e4rat-collect.cc
@@ -396,7 +396,7 @@ int main(int argc, char* argv[])
          * Parse application list given as arguments
          */
         for ( ; optind < argc; optind++)
-            project.observeApp(fs::path(argv[optind]).filename());
+            project.observeApp(fs::path(argv[optind]).filename().string());
 
         /*
          * Parse application list on stdin
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin