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
${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}
${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}
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ 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
-///////////////////////////////////////////////////////////////////
+++ /dev/null
-/*---------------------------------------------------------------------\
-| ____ _ __ __ ___ |
-| |__ / \ / / . \ . \ |
-| / / \ 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