Drop unneeded parser/plaindir/* code
authorMichael Andres <ma@suse.de>
Thu, 3 Apr 2014 14:57:26 +0000 (16:57 +0200)
committerMichael Andres <ma@suse.de>
Thu, 3 Apr 2014 14:57:26 +0000 (16:57 +0200)
zypp/CMakeLists.txt
zypp/parser/plaindir/RepoParser.cc [deleted file]
zypp/parser/plaindir/RepoParser.h [deleted file]

index 82232c8..1460c81 100644 (file)
@@ -400,19 +400,6 @@ INSTALL(  FILES
   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/susetags
 )
 
-SET( zypp_parser_plaindir_SRCS
-  parser/plaindir/RepoParser.cc
-)
-
-SET( zypp_parser_plaindir_HEADERS
-  parser/plaindir/RepoParser.h
-)
-
-INSTALL(  FILES
-  ${zypp_parser_plaindir_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/parser/plaindir
-)
-
 SET( zypp_parser_xml_SRCS
   parser/xml/Node.cc
   parser/xml/ParseDef.cc
@@ -831,7 +818,6 @@ ${zypp_pool_SRCS}
 ${zypp_parser_susetags_SRCS}
 ${zypp_parser_xml_SRCS}
 ${zypp_parser_yum_SRCS}
-${zypp_parser_plaindir_SRCS}
 ${zypp_parser_ws_SRCS}
 ${zypp_parser_SRCS}
 ${zypp_media_proxyinfo_SRCS}
@@ -862,7 +848,6 @@ ${zypp_target_rpm_HEADERS}
 ${zypp_parser_tagfile_HEADERS}
 ${zypp_parser_susetags_HEADERS}
 ${zypp_parser_yum_HEADERS}
-${zypp_parser_plaindir_HEADERS}
 ${zypp_parser_xml_HEADERS}
 ${zypp_parser_ws_HEADERS}
 ${zypp_parser_HEADERS}
diff --git a/zypp/parser/plaindir/RepoParser.cc b/zypp/parser/plaindir/RepoParser.cc
deleted file mode 100644 (file)
index feb64aa..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include <iostream>
-#include "zypp/base/Logger.h"
-#include "zypp/base/String.h"
-
-#include "zypp/PathInfo.h"
-
-#include "zypp/parser/plaindir/RepoParser.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace parser
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace plaindir
-{ /////////////////////////////////////////////////////////////////
-
-static void recursive_timestamp( const Pathname &dir, time_t & max )
-{
-  std::list<std::string> dircontent;
-  if ( filesystem::readdir( dircontent, dir, false/*no dots*/ ) != 0 )
-    return; // readdir logged the error
-
-  for_( it, dircontent.begin(), dircontent.end() )
-  {
-    PathInfo pi( dir + *it, PathInfo::LSTAT );
-    if ( pi.isDir() )
-    {
-      recursive_timestamp( pi.path(), max );
-      if ( pi.mtime() > max )
-        max = pi.mtime();
-    }
-  }
-}
-
-RepoStatus dirStatus( const Pathname &dir )
-{
-  time_t t = 0;
-  PathInfo pi(dir);
-  if ( pi.isDir() )
-  {
-    t = pi.mtime();
-    recursive_timestamp(dir,t);
-  }
-  RepoStatus status;
-  status.setTimestamp(Date(t));
-  status.setChecksum(str::numstring(t));
-  return status;
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace plaindir
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace parser
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/parser/plaindir/RepoParser.h b/zypp/parser/plaindir/RepoParser.h
deleted file mode 100644 (file)
index 0481569..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef ZYPP_PARSER_PLAINDIR_REPOPARSER_H
-#define ZYPP_PARSER_PLAINDIR_REPOPARSER_H
-
-#include "zypp/RepoStatus.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace parser
-  { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace plaindir
-    { /////////////////////////////////////////////////////////////////
-
-      /**
-       * \short Gives a cookie for a dir
-       */
-      RepoStatus dirStatus( const Pathname &dir );
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace plaindir
-    ///////////////////////////////////////////////////////////////////
-    /////////////////////////////////////////////////////////////////
-  } // namespace parser
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_PARSER_PLAINDIR_REPOPARSER_H