Author: dmacvicar Date: Wed May 23 16:37:53 2007 New Revision: 5613 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5613&view=rev Log: - use the in-code schema - dont install the schema Modified: trunk/libzypp/zypp2/CMakeLists.txt trunk/libzypp/zypp2/cache/CacheInitializer.cpp Modified: trunk/libzypp/zypp2/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/CMakeLists.txt?rev=5613&r1=5612&r2=5613&view=diff ============================================================================== --- trunk/libzypp/zypp2/CMakeLists.txt (original) +++ trunk/libzypp/zypp2/CMakeLists.txt Wed May 23 16:37:53 2007 @@ -12,7 +12,7 @@ #FILE(WRITE filename "message to write"... ) -ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/zypp2/schema.h PRE_BUILD COMMAND "${CMAKE_BINARY_DIR}/zypp2/mkarray" ARGS "${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql" "schemaData" "${CMAKE_BINARY_DIR}/zypp2/schema.h" DEPENDS mkarray) +ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/zypp2/schema.h PRE_BUILD COMMAND "${CMAKE_BINARY_DIR}/zypp2/mkarray" ARGS "${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql" "schemaData" "${CMAKE_BINARY_DIR}/zypp2/schema.h" DEPENDS mkarray DEPENDS ${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql ) SET( zypp2_SRCS Repository.cc @@ -178,5 +178,4 @@ # install DB schema # install XML schemas -FILE( GLOB YUM_SCHEMA_FILES ${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql ) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zypp/cache" ) +#FILE( GLOB YUM_SCHEMA_FILES ${CMAKE_SOURCE_DIR}/zypp2/cache/schema/schema.sql ) Modified: trunk/libzypp/zypp2/cache/CacheInitializer.cpp URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp2/cache/CacheInitializer.cpp?rev=5613&r1=5612&r2=5613&view=diff ============================================================================== --- trunk/libzypp/zypp2/cache/CacheInitializer.cpp (original) +++ trunk/libzypp/zypp2/cache/CacheInitializer.cpp Wed May 23 16:37:53 2007 @@ -97,24 +97,7 @@ MIL << "Initializing cache schema..." << endl; sqlite3_transaction trans(*_pimpl->con); { - string sql; - const char *filename = "/usr/share/zypp/cache/schema.sql"; - std::ifstream stream(filename); - string buffer; - if ( stream ) - { - stringstream str(sql); - while ( getline( stream, buffer ) ) - { - sql += (buffer+"\n"); - } - //std::cout << sql << endl; - } - else - { - ZYPP_THROW(Exception(str::form("Can't open db schema %s", filename))); - } - + string sql( schemaData, _schemaData_size); //ERR << "Executing " << statements[i] << endl; MIL << "Schema size: " << sql.size() << endl; _pimpl->con->execute(sql.c_str()); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org