Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7142 - in /trunk/libzypp/devel/devel.shaas/PdbToZypp: CMakeLists.txt pdbtozypp.cc pdbtozypp.h swig/CMakeLists.txt swig/PdbToZypp.i
  • From: haass@xxxxxxxxxxxxxxxx
  • Date: Fri, 07 Sep 2007 11:00:32 -0000
  • Message-id: <20070907110033.1A6A92AFED@xxxxxxxxxxxxxxxx>
Author: haass
Date: Fri Sep  7 13:00:32 2007
New Revision: 7142

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7142&view=rev
Log:
stop if no db connection

Modified:
    trunk/libzypp/devel/devel.shaas/PdbToZypp/CMakeLists.txt
    trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.cc
    trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.h
    trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/CMakeLists.txt
    trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/PdbToZypp.i

Modified: trunk/libzypp/devel/devel.shaas/PdbToZypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.shaas/PdbToZypp/CMakeLists.txt?rev=7142&r1=7141&r2=7142&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.shaas/PdbToZypp/CMakeLists.txt (original)
+++ trunk/libzypp/devel/devel.shaas/PdbToZypp/CMakeLists.txt Fri Sep  7 13:00:32 2007
@@ -4,17 +4,6 @@
 
 SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fpic -D_REENTRANT" )
 
-FIND_PROGRAM(SWIG_EXECUTABLE
-  NAMES swig-1.3 swig
-  PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
-)
-
-IF ( NOT SWIG_EXECUTABLE )
-   MESSAGE( FATAL_ERROR " swig not found" )
-ELSE ( NOT SWIG_EXECUTABLE )
-   MESSAGE( STATUS "SWIG found at ${SWIG_EXECUTABLE}" )
-ENDIF ( NOT SWIG_EXECUTABLE ) 
-
 FIND_PACKAGE(Zypp REQUIRED)
 IF ( NOT ZYPP_LIBRARY )
    MESSAGE( FATAL_ERROR " zypp not found" )
@@ -42,4 +31,4 @@
 
 INSTALL(TARGETS pdbtozypp LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
 
-ADD_SUBDIRECTORY(swig)
+#ADD_SUBDIRECTORY(swig)

Modified: trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.cc?rev=7142&r1=7141&r2=7142&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.cc (original)
+++ trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.cc Fri Sep  7 13:00:32 2007
@@ -12,7 +12,7 @@
 
 }
 
-void PdbToZypp::readOut(){
+int PdbToZypp::readOut(){
 
    //store = new ResStore;
 
@@ -20,16 +20,15 @@
        database *dbPackages = new database("lorien.suse.de", "rpmread", "rrrrrrr", "package");
 
        if(dbPackages->connect() != 1){
-               //std::cout << "NO DB CONNECTION!!!\n";
-               //return 1;
+               std::cout << "NO DB CONNECTION!!!\n";
+               return 0;
        }
 
        if(dbDeps->connect() != 1){
-               //std::cout << "NO DB CONNECTION!!!\n";
-               //return 1;
+               std::cout << "NO DB CONNECTION!!!\n";
+               return 0;
        }
 
-       //dbPackages->sqlexecute("SELECT PackID, PackNameShort, PackStatus FROM Packages WHERE CDReleaseID = 10 AND PackStatus IN (0, 6, 7, 8) AND BasedOnID IS NULL");
        dbPackages->sqlexecute("SELECT PackID, PackNameShort, PackStatus FROM Packages WHERE CDReleaseID IN (10, 64) AND PackStatus IN (0, 6, 7, 8) OR PackStatus IS NULL AND BasedOnID IS NULL");
 
        std::vector< std::vector<string> > packIDs = dbPackages->getResult();
@@ -193,6 +192,7 @@
                }*/
 
                store.insert(p);
+      return 1;
        }
 
        dbDeps->close();

Modified: trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.h?rev=7142&r1=7141&r2=7142&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.h (original)
+++ trunk/libzypp/devel/devel.shaas/PdbToZypp/pdbtozypp.h Fri Sep  7 13:00:32 2007
@@ -15,7 +15,7 @@
                //PdbToZypp(zypp::ResStore  & _store);
                PdbToZypp();
       ~PdbToZypp();
-      void readOut();
+      int readOut();
       zypp::ResStore getStore();
    private:
       zypp::ResStore store;

Modified: trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/CMakeLists.txt?rev=7142&r1=7141&r2=7142&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/CMakeLists.txt (original)
+++ trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/CMakeLists.txt Fri Sep  7 13:00:32 2007
@@ -1,5 +1,19 @@
+PROJECT(swigpdbtozypp)
+
 FIND_PACKAGE(Perl REQUIRED)
 
+FIND_PROGRAM(SWIG_EXECUTABLE
+  NAMES swig-1.3 swig
+  PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
+)
+
+IF ( NOT SWIG_EXECUTABLE )
+   MESSAGE( FATAL_ERROR " swig not found" )
+ELSE ( NOT SWIG_EXECUTABLE )
+   MESSAGE( STATUS "SWIG found at ${SWIG_EXECUTABLE}" )
+ENDIF ( NOT SWIG_EXECUTABLE ) 
+
+
 EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{cppflags}" OUTPUT_VARIABLE PERL_CXX_FLAGS)
 
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PERL_CXX_FLAGS}")

Modified: trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/PdbToZypp.i
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/PdbToZypp.i?rev=7142&r1=7141&r2=7142&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/PdbToZypp.i (original)
+++ trunk/libzypp/devel/devel.shaas/PdbToZypp/swig/PdbToZypp.i Fri Sep  7 13:00:32 2007
@@ -11,7 +11,7 @@
                //PdbToZypp(zypp::ResStore  & _store);
                PdbToZypp();
       ~PdbToZypp();
-      void readOut();
+      int readOut();
       ResStore getStore();
    private:
       ResStore store;

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages