Hello community, here is the log from the commit of package soprano for openSUSE:Factory checked in at Thu May 19 11:55:10 CEST 2011.
-------- --- soprano/soprano-backend-sesame.changes 2010-12-14 14:32:10.000000000 +0100 +++ /mounts/work_src_done/STABLE/soprano/soprano-backend-sesame.changes 2011-05-16 20:08:54.000000000 +0200 @@ -1,0 +2,26 @@ +Mon May 16 17:33:37 UTC 2011 - [email protected] + +- Update to 2.6.0: + * Fixed handling of xsd:boolean in SPARQL queries in the Virtuoso backend + (this is a hack that might not work in all situations) + * Added new parameter for the Virtuoso backend: QueryTimeout allows to set a + maximum query exeution time. + * Added new parameter for the Virtuoso backend: RestartOnCrash will restart + the Virtuoso server if it crashes. + * QueryResultIterator::next() now always returns false for boolean results. + This breaks behaviour compared to previous versions. However, always + returning true as before results in endless loops if the client does not + check the type of the query result. Thus, in the interest of stability this + change has been made anyway. + * Lock the storage dir of a running virtuoso instance to avoid reusing it. +- Spec file updates: + * Changes based on spec-cleaner run. + * Changed License: to LGPLv2+. + * Updates in Summary, %description and Group entries. + * Added librasqal-devel in BuildRequires:. + * Removed fdupes from BuildRequires: for sesame and virtuoso backends (not + needed). + * Minor other updates. +- Fixed rpmlint warning "untranslated-desktop-file". + +------------------------------------------------------------------- soprano-backend-virtuoso.changes: same change soprano.changes: same change calling whatdependson for head-i586 Old: ---- soprano-2.5.63.tar.bz2 New: ---- soprano-2.6.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ soprano-backend-sesame.spec ++++++ --- /var/tmp/diff_new_pack.ur2Zmp/_old 2011-05-19 11:51:55.000000000 +0200 +++ /var/tmp/diff_new_pack.ur2Zmp/_new 2011-05-19 11:51:55.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package soprano-backend-sesame (Version 2.5.63) +# spec file for package soprano-backend-sesame # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,25 +19,37 @@ Name: soprano-backend-sesame Url: http://soprano.sourceforge.net/ -BuildRequires: fdupes java-devel libsoprano-devel -License: GPLv2+ ; LGPLv2.1+ -Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF - Sesame backend +License: LGPLv2+ +Group: System/Libraries +Summary: Sesame backend for Soprano BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: java-devel # COMMON1-BEGIN # COMMON1-BEGIN -BuildRequires: cmake kde4-filesystem libqt4-devel libraptor-devel libredland-devel -BuildRequires: boost-devel clucene-core-devel doxygen raptor -Version: 2.5.63 -Release: 2 -Source: soprano-%{version}.tar.bz2 -Source2: baselibs.conf +Version: 2.6.0 +Release: 1 +Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2 +Source100: baselibs.conf +BuildRequires: boost-devel +BuildRequires: clucene-core-devel +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: kde4-filesystem +BuildRequires: libqt4-devel +BuildRequires: libraptor-devel +BuildRequires: librasqal-devel +BuildRequires: libredland-devel +BuildRequires: raptor +%if 0%{?suse_version} +BuildRequires: update-desktop-files +%endif # COMMON1-END # COMMON1-END +BuildRequires: java-devel +BuildRequires: libsoprano-devel +Requires: libsoprano4 = %{version} +Requires: java-devel Provides: soprano_backend = %{version} Provides: backend-sesame2 = %{version} -Requires: libsoprano4 = %{version} %description This package provides a Sesame based backend for Soprano. @@ -51,22 +63,26 @@ %build export JAVA_HOME=%{_jvmdir}/java - %cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON - %make_jobs +%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON +%make_jobs %install - cd build - # this uses the cmake (mis)feature of 'make' building also the dependencies outside - # the directory and its subdirectories, 'make install' not installing them - cd backends/sesame2 - %makeinstall -%if %suse_version > 1020 - %fdupes -s %{buildroot}%{_includedir} +cd build +# this uses the cmake (mis)feature of 'make' building also the dependencies outside +# the directory and its subdirectories, 'make install' not installing them +cd backends/sesame2 +%make_install +cd .. + +%if 0%{?suse_version} +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/sesame2backend.desktop %endif - cd .. + +%clean +rm -rf %{buildroot} %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_datadir}/soprano/sesame2 %{_libdir}/soprano/libsoprano_sesame2backend.so %{_datadir}/soprano/plugins/sesame2backend.desktop ++++++ soprano-backend-virtuoso.spec ++++++ --- /var/tmp/diff_new_pack.ur2Zmp/_old 2011-05-19 11:51:55.000000000 +0200 +++ /var/tmp/diff_new_pack.ur2Zmp/_new 2011-05-19 11:51:55.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package soprano-backend-virtuoso (Version 2.5.63) +# spec file for package soprano-backend-virtuoso # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,29 +19,40 @@ Name: soprano-backend-virtuoso Url: http://soprano.sourceforge.net/ -BuildRequires: fdupes libsoprano-devel -License: GPLv2+ ; LGPLv2.1+ -Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF +License: LGPLv2+ +Group: System/Libraries +Summary: Virtuoso backend for Soprano BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libiodbc-devel # COMMON1-BEGIN # COMMON1-BEGIN -BuildRequires: cmake kde4-filesystem libqt4-devel libraptor-devel libredland-devel -BuildRequires: boost-devel clucene-core-devel doxygen raptor -Version: 2.5.63 -Release: 2 -Source: soprano-%{version}.tar.bz2 -Source2: baselibs.conf +Version: 2.6.0 +Release: 1 +Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2 +Source100: baselibs.conf +BuildRequires: boost-devel +BuildRequires: clucene-core-devel +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: kde4-filesystem +BuildRequires: libqt4-devel +BuildRequires: libraptor-devel +BuildRequires: librasqal-devel +BuildRequires: libredland-devel +BuildRequires: raptor +%if 0%{?suse_version} +BuildRequires: update-desktop-files +%endif # COMMON1-END # COMMON1-END -Provides: soprano_backend = %{version} -Provides: backend-virtuso = %{version} +BuildRequires: libiodbc-devel +BuildRequires: libsoprano-devel Requires: libsoprano4 = %{version} Requires: virtuoso-server +Provides: soprano_backend = %{version} +Provides: backend-virtuso = %{version} %description -Soprano Backend for the RDF QT/C++ interface library using Virtuoso for storage. +This package provides a Virtuoso based backend for Soprano. %prep # COMMON2-BEGIN @@ -51,22 +62,26 @@ # COMMON2-END %build - %cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_VIRTUOSO_BACKEND=ON - %make_jobs +%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_VIRTUOSO_BACKEND=ON +%make_jobs %install - cd build - # this uses the cmake (mis)feature of 'make' building also the dependencies outside - # the directory and its subdirectories, 'make install' not installing them - cd backends/virtuoso - %makeinstall -%if %suse_version > 1020 - %fdupes -s %{buildroot}%{_includedir} +cd build +# this uses the cmake (mis)feature of 'make' building also the dependencies outside +# the directory and its subdirectories, 'make install' not installing them +cd backends/virtuoso +%make_install +cd .. + +%if 0%{?suse_version} +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/virtuosobackend.desktop %endif - cd .. + +%clean +rm -rf %{buildroot} %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_libdir}/soprano/libsoprano_virtuosobackend.so %{_datadir}/soprano/plugins/virtuosobackend.desktop ++++++ soprano.spec ++++++ --- /var/tmp/diff_new_pack.ur2Zmp/_old 2011-05-19 11:51:55.000000000 +0200 +++ /var/tmp/diff_new_pack.ur2Zmp/_new 2011-05-19 11:51:55.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package soprano (Version 2.5.63) +# spec file for package soprano # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,22 +19,33 @@ Name: soprano Url: http://soprano.sourceforge.net/ -BuildRequires: fdupes -License: LGPLv2.1+ -Group: Development/Libraries/C and C++ +License: LGPLv2+ +Group: System/Libraries Summary: C++/Qt based interface library for RDF +BuildRoot: %{_tmppath}/%{name}-%{version}-build # COMMON1-BEGIN -BuildRequires: cmake kde4-filesystem libqt4-devel libraptor-devel libredland-devel -BuildRequires: boost-devel clucene-core-devel doxygen raptor -Version: 2.5.63 -Release: 2 -Source: soprano-%{version}.tar.bz2 -Source2: baselibs.conf +Version: 2.6.0 +Release: 1 +Source0: http://sourceforge.net/projects/soprano/files/Soprano/%{version}/soprano-%{version}.tar.bz2 +Source100: baselibs.conf +BuildRequires: boost-devel +BuildRequires: clucene-core-devel +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: kde4-filesystem +BuildRequires: libqt4-devel +BuildRequires: libraptor-devel +BuildRequires: librasqal-devel +BuildRequires: libredland-devel +BuildRequires: raptor +%if 0%{?suse_version} +BuildRequires: update-desktop-files +%endif # COMMON1-END +BuildRequires: fdupes Requires: libsoprano4 = %{version} Recommends: soprano_backend = %{version} Recommends: soprano-backend-virtuoso -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Soprano is an open and pluggable RDF resource framework which is build @@ -43,43 +54,30 @@ Soprano are desktop applications as it is being developed as a subproject of Nepomuk, the semantic desktop initiative. - - -Authors: --------- - Daniele Galdi <[email protected]> - Sebastian Trueg <[email protected]> - %prep # COMMON2-BEGIN %setup -q -n soprano-%{version} # COMMON2-END %package -n libsoprano-devel -License: LGPLv2.1+ +License: LGPLv2+ +Summary: Developer files for Soprano Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF -Requires: libsoprano4 = %version -Requires: %name = %version -Requires: libqt4-devel >= %( echo `rpm -q --queryformat '%{VERSION}' libqt4-devel`) -Requires: clucene-core-devel >= %( echo `rpm -q --queryformat '%{VERSION}' clucene-core-devel`) -Requires: libraptor-devel libredland-devel +Requires: %{name} = %{version} +%requires_ge clucene-core-devel +%requires_ge libqt4-devel +Requires: libraptor-devel +Requires: libredland-devel +Requires: libsoprano4 = %{version} Requires: soprano-backend-redland %description -n libsoprano-devel -Soprano is a RDF QT/C++ interface library using redland as a backend - - - -Authors: --------- - Daniele Galdi <[email protected]> - Sebastian Trueg <[email protected]> +This package contains developer files for Soprano. %package -n libsoprano4 -License: LGPLv2.1+ -Group: Development/Libraries/C and C++ +License: LGPLv2+ Summary: C++/Qt based interface library for RDF +Group: System/Libraries %requires_ge libqt4 %description -n libsoprano4 @@ -89,46 +87,45 @@ Soprano are desktop applications as it is being developed as a subroject of Nepomuk, the semantic desktop initiative. - - -Authors: --------- - Daniele Galdi <[email protected]> - Sebastian Trueg <[email protected]> - %package backend-redland -License: LGPLv2.1+ -Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF -Provides: soprano_backend = %version -Requires: libsoprano4 = %version +License: LGPLv2+ +Summary: Redland backend for Soprano +Group: System/Libraries +Requires: libsoprano4 = %{version} +Provides: soprano_backend = %{version} %description backend-redland -Soprano is a RDF QT/C++ interface library using redland as a backend - - - -Authors: --------- - Daniele Galdi <[email protected]> - Sebastian Trueg <[email protected]> +This package provides a Redland based backend for Soprano. %build - %cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF - %make_jobs +%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF +%make_jobs %install - cd build - %makeinstall - %fdupes -s %{buildroot}%{_includedir} +cd build +%make_install +cd .. + +%if 0%{?suse_version} +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/nquadparser.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/nquadserializer.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/raptorparser.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/raptorserializer.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/redlandbackend.desktop +%endif + +%fdupes -s %{buildroot}%{_includedir} %post -n libsoprano4 -p /sbin/ldconfig %postun -n libsoprano4 -p /sbin/ldconfig +%clean +rm -rf %{buildroot} + %files -%defattr(-,root,root) -%doc AUTHORS TODO +%defattr(-,root,root,-) +%doc AUTHORS COPYING COPYING.LIB ChangeLog README TODO %{_bindir}/onto2vocabularyclass %{_bindir}/sopranocmd %{_bindir}/sopranod @@ -152,7 +149,7 @@ %{_libdir}/soprano/libsoprano_raptorserializer.so %files -n libsoprano4 -%defattr(-,root,root) +%defattr(-,root,root,-) %{_libdir}/libsopranoclient.so.1 %{_libdir}/libsopranoclient.so.1.2.0 %{_libdir}/libsopranoserver.so.1 @@ -163,7 +160,7 @@ %{_libdir}/libsopranoindex.so.1.1.0 %files -n libsoprano-devel -%defattr(-,root,root) +%defattr(-,root,root,-) %{_includedir}/soprano %{_includedir}/Soprano %{_libdir}/libsoprano.so @@ -178,7 +175,7 @@ %{_datadir}/soprano/cmake/SopranoAddOntology.cmake %files backend-redland -%defattr(-,root,root) +%defattr(-,root,root,-) %{_libdir}/soprano/libsoprano_redlandbackend.so %{_datadir}/soprano/plugins/redlandbackend.desktop ++++++ soprano-2.5.63.tar.bz2 -> soprano-2.6.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/CMakeLists.txt new/soprano-2.6.0/CMakeLists.txt --- old/soprano-2.5.63/CMakeLists.txt 2010-09-14 14:54:33.000000000 +0200 +++ new/soprano-2.6.0/CMakeLists.txt 2011-02-01 15:51:41.000000000 +0100 @@ -6,8 +6,8 @@ ################## Soprano version ################################ set(CMAKE_SOPRANO_VERSION_MAJOR 2) -set(CMAKE_SOPRANO_VERSION_MINOR 5) -set(CMAKE_SOPRANO_VERSION_RELEASE 63) +set(CMAKE_SOPRANO_VERSION_MINOR 6) +set(CMAKE_SOPRANO_VERSION_RELEASE 0) set(CMAKE_SOPRANO_VERSION_STRING "${CMAKE_SOPRANO_VERSION_MAJOR}.${CMAKE_SOPRANO_VERSION_MINOR}.${CMAKE_SOPRANO_VERSION_RELEASE}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/CTestConfig.cmake new/soprano-2.6.0/CTestConfig.cmake --- old/soprano-2.5.63/CTestConfig.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/soprano-2.6.0/CTestConfig.cmake 2011-02-01 15:51:41.000000000 +0100 @@ -0,0 +1,13 @@ +## This file should be placed in the root directory of your project. +## Then modify the CMakeLists.txt file in the root directory of your +## project to incorporate the testing dashboard. +## # The following are required to uses Dart and the Cdash dashboard +## ENABLE_TESTING() +## INCLUDE(CTest) +set(CTEST_PROJECT_NAME "soprano") +set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=soprano") +set(CTEST_DROP_SITE_CDASH TRUE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/CTestCustom.cmake new/soprano-2.6.0/CTestCustom.cmake --- old/soprano-2.5.63/CTestCustom.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/soprano-2.6.0/CTestCustom.cmake 2011-02-01 15:51:41.000000000 +0100 @@ -0,0 +1,22 @@ +# This file contains all the specific settings that will be used +# when running 'make Experimental' + +# Change the maximum warnings that will be displayed +# on the report page (default 50) +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000) + +# Errors that will be ignored +set(CTEST_CUSTOM_ERROR_EXCEPTION + ${CTEST_CUSTOM_ERROR_EXCEPTION} + "ICECC" + "Segmentation fault" + "GConf Error" + "Client failed to connect to the D-BUS daemon" + "Failed to connect to socket" + "qlist.h.*increases required alignment of target type" + "qmap.h.*increases required alignment of target type" + "qhash.h.*increases required alignment of target type" + ) + +# No coverage for these files +set(CTEST_CUSTOM_COVERAGE_EXCLUDE ".moc$" "moc_" "ui_") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/ChangeLog new/soprano-2.6.0/ChangeLog --- old/soprano-2.5.63/ChangeLog 2010-08-27 18:30:39.000000000 +0200 +++ new/soprano-2.6.0/ChangeLog 2011-02-01 15:51:41.000000000 +0100 @@ -1,6 +1,13 @@ 2.6.0 * Fixed handling of xsd:boolean in SPARQL queries in the Virtuoso backend + (this is a hack that might not work in all situations) * Added new parameter for the Virtuoso backend: QueryTimeout allows to set a maximum query exeution time. + * Added new parameter for the Virtuoso backend: RestartOnCrash will restart the Virtuoso server if it crashes. + * QueryResultIterator::next() now always returns false for boolean results. This breaks behaviour + compared to previous versions. However, always returning true as before results in endless loops if + the client does not check the type of the query result. Thus, in the interest of stability this change + has been made anyway. + * Lock the storage dir of a running virtuoso instance to avoid reusing it. 2.5.0 * New public qHash method for Statement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/README new/soprano-2.6.0/README --- old/soprano-2.5.63/README 2009-03-06 14:10:27.000000000 +0100 +++ new/soprano-2.6.0/README 2011-02-01 15:51:41.000000000 +0100 @@ -1,4 +1,4 @@ -Soprano 2.3 +Soprano 2.6 =========== Soprano (formally known as QRDF) is a library which provides a nice Qt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/redland/redlandqueryresult.cpp new/soprano-2.6.0/backends/redland/redlandqueryresult.cpp --- old/soprano-2.5.63/backends/redland/redlandqueryresult.cpp 2009-02-11 14:32:20.000000000 +0100 +++ new/soprano-2.6.0/backends/redland/redlandqueryresult.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -2,7 +2,7 @@ * This file is part of Soprano Project. * * Copyright (C) 2006 Daniele Galdi <[email protected]> - * Copyright (C) 2007 Sebastian Trueg <[email protected]> + * Copyright (C) 2007-2010 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -115,7 +115,7 @@ return false; } else if ( isBool() ) { - return true; + return false; } else if ( isBinding() ) { bool hasNext = librdf_query_results_finished( d->result ) == 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/sesame2/sesame2queryresultiteratorbackend.cpp new/soprano-2.6.0/backends/sesame2/sesame2queryresultiteratorbackend.cpp --- old/soprano-2.5.63/backends/sesame2/sesame2queryresultiteratorbackend.cpp 2008-05-05 17:34:04.000000000 +0200 +++ new/soprano-2.6.0/backends/sesame2/sesame2queryresultiteratorbackend.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -1,7 +1,7 @@ /* * This file is part of Soprano Project. * - * Copyright (C) 2007 Sebastian Trueg <[email protected]> + * Copyright (C) 2007-2010 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -102,7 +102,7 @@ bool Soprano::Sesame2::QueryResultIteratorBackend::next() { if ( d->isBooleanResult ) { - return d->model != 0; + return false; } if ( d->result->hasNext() ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/virtuoso/virtuosocontroller.cpp new/soprano-2.6.0/backends/virtuoso/virtuosocontroller.cpp --- old/soprano-2.5.63/backends/virtuoso/virtuosocontroller.cpp 2010-09-14 14:56:53.000000000 +0200 +++ new/soprano-2.6.0/backends/virtuoso/virtuosocontroller.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -1,7 +1,7 @@ /* * This file is part of Soprano Project * - * Copyright (C) 2009 Sebastian Trueg <[email protected]> + * Copyright (C) 2009-2011 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -112,8 +112,17 @@ const QString storageDir = valueInSettings( settings, BackendOptionStorageDir ).toString(); + // aquire a lock for ourselves + m_virtuosoLock.setFileName( storageDir + QLatin1String("/soprano-virtuoso.lock") ); + int pid = 0; + if( !m_virtuosoLock.aquireLock( &pid ) ) { + setError( QString::fromLatin1("Another instance of Soprano (%1) is already running on the data in '%2'.") + .arg(pid).arg(storageDir)); + return false; + } + // check if another instance of Virtuoso is running - int pid = pidOfRunningVirtuosoInstance( storageDir ); + pid = pidOfRunningVirtuosoInstance( storageDir ); if ( pid > 0 && valueInSettings( settings, "forcedstart", false ).toBool() ) { #ifndef Q_OS_WIN qDebug( "Shutting down Virtuoso instance (%d) which is in our way.", pid ); @@ -213,10 +222,12 @@ m_status = Killing; m_virtuosoProcess.kill(); m_virtuosoProcess.waitForFinished(); + m_virtuosoLock.releaseLock(); return false; } else { clearError(); + m_virtuosoLock.releaseLock(); return true; } #else @@ -224,11 +235,13 @@ m_virtuosoProcess.kill(); m_virtuosoProcess.waitForFinished(); clearError(); + m_virtuosoLock.releaseLock(); return true; #endif } else { setError( "Virtuoso not running. Cannot shutdown." ); + m_virtuosoLock.releaseLock(); return false; } } @@ -248,6 +261,9 @@ QFile::remove( m_configFilePath ); } + // release our lock + m_virtuosoLock.releaseLock(); + m_lastExitStatus = NormalExit; if ( exitStatus == QProcess::CrashExit ) m_lastExitStatus = CrashExit; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/virtuoso/virtuosocontroller.h new/soprano-2.6.0/backends/virtuoso/virtuosocontroller.h --- old/soprano-2.5.63/backends/virtuoso/virtuosocontroller.h 2010-02-11 12:02:36.000000000 +0100 +++ new/soprano-2.6.0/backends/virtuoso/virtuosocontroller.h 2011-02-01 15:51:41.000000000 +0100 @@ -1,7 +1,7 @@ /* * This file is part of Soprano Project * - * Copyright (C) 2009 Sebastian Trueg <[email protected]> + * Copyright (C) 2009-2011 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -27,6 +27,7 @@ #include "error.h" #include "backend.h" +#include "lockfile.h" class QEventLoop; @@ -93,6 +94,8 @@ ExitStatus m_lastExitStatus; QEventLoop* m_initializationLoop; + + LockFile m_virtuosoLock; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/virtuoso/virtuosomodel.cpp new/soprano-2.6.0/backends/virtuoso/virtuosomodel.cpp --- old/soprano-2.5.63/backends/virtuoso/virtuosomodel.cpp 2010-08-31 15:55:01.000000000 +0200 +++ new/soprano-2.6.0/backends/virtuoso/virtuosomodel.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -345,7 +345,10 @@ if ( conn->executeCommand( "sparql " + query ) == Error::ErrorNone ) { // FIXME: can this be done with SQL/RDF views? emit statementsRemoved(); - emit statementRemoved( statement ); + Statement signalStatement( statement ); + if( signalStatement.context() == Virtuoso::defaultGraph() ) + signalStatement.setContext( Node() ); + emit statementRemoved( signalStatement ); } setError( conn->lastError() ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp new/soprano-2.6.0/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp --- old/soprano-2.5.63/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp 2010-07-22 10:51:32.000000000 +0200 +++ new/soprano-2.6.0/backends/virtuoso/virtuosoqueryresultiteratorbackend.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -129,7 +129,7 @@ { switch( d->m_resultType ) { case QueryResultIteratorBackendPrivate::AskResult: - return d->m_queryResult != 0; + return false; case QueryResultIteratorBackendPrivate::GraphResult: return d->graphIterator.next(); @@ -189,7 +189,10 @@ Soprano::Node Soprano::Virtuoso::QueryResultIteratorBackend::binding( int offset ) const { - if ( d->m_queryResult && offset < bindingCount() && offset >= 0 ) { + if ( isBinding() && + d->m_queryResult && + offset < bindingCount() && + offset >= 0 ) { if ( !d->bindingCachedFlags[offset] ) { Node node = d->m_queryResult->getData( offset+1 ); setError( d->m_queryResult->lastError() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/client/localsocketclient.cpp new/soprano-2.6.0/client/localsocketclient.cpp --- old/soprano-2.5.63/client/localsocketclient.cpp 2010-09-09 17:47:55.000000000 +0200 +++ new/soprano-2.6.0/client/localsocketclient.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -162,8 +162,10 @@ void Soprano::Client::LocalSocketClient::disconnect() { - d->connection->deleteLater(); - d->connection = 0; + if (d->connection) { + d->connection->deleteLater(); + d->connection = 0; + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/client/sparql/sparqlqueryresult.cpp new/soprano-2.6.0/client/sparql/sparqlqueryresult.cpp --- old/soprano-2.5.63/client/sparql/sparqlqueryresult.cpp 2009-05-06 13:14:09.000000000 +0200 +++ new/soprano-2.6.0/client/sparql/sparqlqueryresult.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -2,7 +2,7 @@ * This file is part of Soprano Project. * * Copyright (C) 2007 Rajeev J Sebastian <[email protected]> - * Copyright (C) 2008 Sebastian Trueg <[email protected]> + * Copyright (C) 2008-2010 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -76,8 +76,8 @@ return( m_currentResultIndex < m_result.results().resultList().count() ); } else { - // boolean result always needs to return true - return true; + // boolean result always needs to return false + return false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/cmake/modules/SopranoAddOntology.cmake new/soprano-2.6.0/cmake/modules/SopranoAddOntology.cmake --- old/soprano-2.5.63/cmake/modules/SopranoAddOntology.cmake 2009-11-12 19:11:35.000000000 +0100 +++ new/soprano-2.6.0/cmake/modules/SopranoAddOntology.cmake 2011-02-01 15:51:41.000000000 +0100 @@ -16,7 +16,7 @@ # Example: # soprano_add_ontology(pimo_LIB_SRCS ${PIMO_TRIG_SOURCE} "PIMO" "Nepomuk::Vocabulary" "trig" VISIBILITY "nepomuk") # -# Copyright (C) 2009 Sebastian Trueg <[email protected]> +# Copyright (C) 2009-2010 Sebastian Trueg <[email protected]> # MACRO(SOPRANO_ADD_ONTOLOGY _sources _ontoFile _ontoName _namespace _encoding) @@ -48,4 +48,11 @@ ) list(APPEND ${_sources} ${_ontoSourceFile}) + + # reset the variables we used + unset(_visibility) + unset(_ontoName) + unset(_ontoFilePrefix) + unset(_ontoHeaderFile) + unset(_ontoSourceFile) ENDMACRO(SOPRANO_ADD_ONTOLOGY) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/index/wstring.cpp new/soprano-2.6.0/index/wstring.cpp --- old/soprano-2.5.63/index/wstring.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/soprano-2.6.0/index/wstring.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -0,0 +1,197 @@ +/* + * This file is part of Soprano Project. + * + * Copyright (C) 2007 Sebastian Trueg <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "wstring.h" + +#include <wchar.h> + +#include <QDebug> + + + +// looks as if QT has a bug in toWCharArray, so we use the method from strigi +void utf8toucs2( const char* p, const char* e, wchar_t* buf ) +{ + int i = 0; + char nb = 0; + while (p < e) { + wchar_t w = 0; + char c = *p; + if (nb--) { + w = (w<<6) + (c & 0x3f); + } else if ((0xE0 & c) == 0xC0) { + w = c & 0x1F; + nb = 0; + } else if ((0xF0 & c) == 0xE0) { + w = c & 0x0F; + nb = 1; + } else if ((0xF8 & c) == 0xF0) { + w = c & 0x07; + nb = 2; + } else { + w = (w<<6) + (c&0x7F); + buf[i++] = w; + w = 0; + nb = 0; + } + p++; + } + buf[i] = L'\0'; +} + + +class WString::Private : public QSharedData +{ +public: + Private() + : data( 0 ), + wrap( false ) { + } + + ~Private() { + if ( !wrap ) { + delete [] data; + } + } + + wchar_t* data; + bool wrap; +}; + + +WString::WString() + : d( new Private() ) +{ +} + + +WString::WString( const WString& s ) +{ + d = s.d; +} + + +WString::WString( const wchar_t* s, bool wrap ) + : d( new Private() ) +{ + d->wrap = wrap; + if ( wrap ) { + d->data = const_cast<wchar_t*>( s ); + } + else { + d->data = new wchar_t[ wcslen(s) + 1]; + wcscpy( d->data, s ); + } +} + + +WString::WString( const QString& s ) + : d( new Private() ) +{ + d->data = new wchar_t[s.length()+1]; + + // looks as if QT has a bug in toWCharArray, so we use the method from strigi + QByteArray utf8 = s.toUtf8(); + utf8toucs2( utf8.data(), utf8.data()+utf8.length(), d->data ); +// s.toWCharArray( d->data ); +} + + +WString::~WString() +{ +} + + +WString& WString::operator=( const WString& s ) +{ + d = s.d; + return *this; +} + + +WString& WString::operator=( const wchar_t* s ) +{ + d->data = new wchar_t[ wcslen(s) + 1 ]; + wcscpy( d->data, s ); + return *this; +} + + +WString& WString::operator=( const QString& s ) +{ + d->data = new wchar_t[s.length()+1]; + s.toWCharArray( d->data ); + return *this; +} + + +bool WString::isEmpty() const +{ + return d->data == 0; +} + + +int WString::length() const +{ + return wcslen( d->data ); +} + + +const wchar_t* WString::data() const +{ + return d->data; +} + + +WString::operator QString() const +{ + return toQString(); +} + + +QString WString::toQString() const +{ + return QString::fromWCharArray( d->data ); +} + + +bool WString::operator==( const WString& other ) const +{ + return wcscmp( d->data, other.d->data ) == 0; +} + + +bool WString::operator==( const QString& other ) const +{ + return toQString() == other; +} + + +bool WString::operator!=( const WString& other ) const +{ + return !operator==( other ); +} + + +bool WString::operator!=( const QString& other ) const +{ + return toQString() != other; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/index/wstring.h new/soprano-2.6.0/index/wstring.h --- old/soprano-2.5.63/index/wstring.h 1970-01-01 01:00:00.000000000 +0100 +++ new/soprano-2.6.0/index/wstring.h 2011-02-01 15:51:41.000000000 +0100 @@ -0,0 +1,92 @@ +/* + * This file is part of Soprano Project. + * + * Copyright (C) 2007 Sebastian Trueg <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef _W_STRING_H_ +#define _W_STRING_H_ + +#include <QtCore/QString> +#include <QtCore/QSharedDataPointer> + + +/** + * WString is a simple string class which works on wchar_t + * data. Its main purpose it to provide conversion from and to + * QString. + */ +class WString +{ +public: + /** + * Create an empty WString + */ + WString(); + + /** + * Create a copy of another WString + */ + WString( const WString& ); + + /** + * Create a new WString instance. + * \param data The string data to be used. + * \param wrap If false the data will be copied for the new + * string instance. If true the new WString will act as a wrapper + * around data. + */ + WString( const wchar_t* data, bool wrap = false ); + + /** + * Create a new WString instance as a copy of a QString + */ + WString( const QString& ); + + ~WString(); + + WString& operator=( const WString& ); + WString& operator=( const wchar_t* ); + WString& operator=( const QString& ); + + bool isEmpty() const; + int length() const; + + bool operator==( const WString& ) const; + bool operator==( const QString& ) const; + bool operator!=( const WString& ) const; + bool operator!=( const QString& ) const; + + /** + * The raw string data. It remains valid until the + * string is modified or deleted. + * + * \return the raw string data or 0 if the string is empty. + */ + const wchar_t* data() const; + + operator QString() const; + + QString toQString() const; + +private: + class Private; + QSharedDataPointer<Private> d; +}; + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/server/dbus/dbusserveradaptor.cpp new/soprano-2.6.0/server/dbus/dbusserveradaptor.cpp --- old/soprano-2.5.63/server/dbus/dbusserveradaptor.cpp 2010-04-12 14:14:57.000000000 +0200 +++ new/soprano-2.6.0/server/dbus/dbusserveradaptor.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -93,7 +93,7 @@ // which is issued while an iterator is open. By using the AsyncModel in SingleThreadMode // we make sure that the DBus adaptor never deadlocks. Util::AsyncModel* asyncModel = new Util::AsyncModel( model ); - asyncModel->setParent( model ); // memory management + connect(model, SIGNAL(destroyed()), asyncModel, SLOT(deleteLater()) ); // memory management even across thread boundaries model = asyncModel; QString objectPath = d->dbusObjectPath + "/models/" + normalizeModelName( name ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/soprano/literalvalue.cpp new/soprano-2.6.0/soprano/literalvalue.cpp --- old/soprano-2.5.63/soprano/literalvalue.cpp 2009-05-06 13:15:56.000000000 +0200 +++ new/soprano-2.6.0/soprano/literalvalue.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -1,7 +1,7 @@ /* * This file is part of Soprano Project. * - * Copyright (C) 2007-2009 Sebastian Trueg <[email protected]> + * Copyright (C) 2007-2010 Sebastian Trueg <[email protected]> * Copyright (C) 2009 Greg Beauchesne <[email protected]> * * This library is free software; you can redistribute it and/or @@ -31,6 +31,85 @@ #include <QtCore/QHash> #include <QtCore/QDebug> #include <QtCore/QSharedData> +#include <QtCore/QMutex> +#include <QtCore/QMutexLocker> + + +namespace { +/** + * Helper class for thread-safe conversion between QUrl and QVariant::Type. + */ +class XsdTypePool +{ +public: + XsdTypePool(); + + QVariant::Type typeFromDataTypeUri( const QUrl& dataTypeUri ) const; + QUrl dataTypeUriFromType( QVariant::Type type ) const; + +private: + mutable QMutex m_xsdMutex; + mutable QMutex m_variantMutex; + QHash<QUrl, QVariant::Type> m_xsdHash; + QHash<int, QUrl> m_variantHash; +}; + +XsdTypePool::XsdTypePool() +{ + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::xsdInt(), QVariant::Int ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::integer(), QVariant::Int ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::negativeInteger(), QVariant::Int ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::nonNegativeInteger(), QVariant::UInt ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::decimal(), QVariant::Int ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::xsdShort(), QVariant::Int ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::xsdLong(), QVariant::LongLong ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::unsignedInt(), QVariant::UInt ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::unsignedShort(), QVariant::UInt ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::unsignedLong(), QVariant::ULongLong ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::boolean(), QVariant::Bool ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::xsdDouble(), QVariant::Double ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::xsdFloat(), QVariant::Double ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::string(), QVariant::String ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::date(), QVariant::Date ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::time(), QVariant::Time ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::dateTime(), QVariant::DateTime ); + m_xsdHash.insert( Soprano::Vocabulary::XMLSchema::base64Binary(), QVariant::ByteArray ); + m_xsdHash.insert( Soprano::Vocabulary::RDF::XMLLiteral(), QVariant::String ); + + m_variantHash.insert( QVariant::Int, Soprano::Vocabulary::XMLSchema::xsdInt() ); + m_variantHash.insert( QVariant::LongLong, Soprano::Vocabulary::XMLSchema::xsdLong() ); + m_variantHash.insert( QVariant::UInt, Soprano::Vocabulary::XMLSchema::unsignedInt() ); + m_variantHash.insert( QVariant::ULongLong, Soprano::Vocabulary::XMLSchema::unsignedLong() ); + m_variantHash.insert( QVariant::Bool, Soprano::Vocabulary::XMLSchema::boolean() ); + m_variantHash.insert( QVariant::Double, Soprano::Vocabulary::XMLSchema::xsdDouble() ); + m_variantHash.insert( QVariant::String, Soprano::Vocabulary::XMLSchema::string() ); + m_variantHash.insert( QVariant::Date, Soprano::Vocabulary::XMLSchema::date() ); + m_variantHash.insert( QVariant::Time, Soprano::Vocabulary::XMLSchema::time() ); + m_variantHash.insert( QVariant::DateTime, Soprano::Vocabulary::XMLSchema::dateTime() ); + m_variantHash.insert( QVariant::ByteArray, Soprano::Vocabulary::XMLSchema::base64Binary() ); +} + +QVariant::Type XsdTypePool::typeFromDataTypeUri( const QUrl& dataTypeUri ) const +{ + QMutexLocker lock( &m_xsdMutex ); + QHash<QUrl, QVariant::Type>::const_iterator it = m_xsdHash.constFind( dataTypeUri ); + if ( it != m_xsdHash.constEnd() ) { + return it.value(); + } + else { +// qDebug() << "(Soprano::LiteralValue) unknown literal type uri:" << dataTypeUri; + return QVariant::Invalid; + } +} + +QUrl XsdTypePool::dataTypeUriFromType( QVariant::Type type ) const +{ + QMutexLocker lock( &m_variantMutex ); + return m_variantHash[type]; +} + +Q_GLOBAL_STATIC( XsdTypePool, s_xsdTypePool ) +} class Soprano::LiteralValue::LiteralValueData : public QSharedData @@ -610,58 +689,13 @@ QVariant::Type Soprano::LiteralValue::typeFromDataTypeUri( const QUrl& dataTypeUri ) { - static QHash<QUrl, QVariant::Type> s_xsdTypes; - if( s_xsdTypes.isEmpty() ) { - s_xsdTypes.insert( Vocabulary::XMLSchema::xsdInt(), QVariant::Int ); - s_xsdTypes.insert( Vocabulary::XMLSchema::integer(), QVariant::Int ); - s_xsdTypes.insert( Vocabulary::XMLSchema::negativeInteger(), QVariant::Int ); - s_xsdTypes.insert( Vocabulary::XMLSchema::nonNegativeInteger(), QVariant::UInt ); - s_xsdTypes.insert( Vocabulary::XMLSchema::decimal(), QVariant::Int ); - s_xsdTypes.insert( Vocabulary::XMLSchema::xsdShort(), QVariant::Int ); - s_xsdTypes.insert( Vocabulary::XMLSchema::xsdLong(), QVariant::LongLong ); - s_xsdTypes.insert( Vocabulary::XMLSchema::unsignedInt(), QVariant::UInt ); - s_xsdTypes.insert( Vocabulary::XMLSchema::unsignedShort(), QVariant::UInt ); - s_xsdTypes.insert( Vocabulary::XMLSchema::unsignedLong(), QVariant::ULongLong ); - s_xsdTypes.insert( Vocabulary::XMLSchema::boolean(), QVariant::Bool ); - s_xsdTypes.insert( Vocabulary::XMLSchema::xsdDouble(), QVariant::Double ); - s_xsdTypes.insert( Vocabulary::XMLSchema::xsdFloat(), QVariant::Double ); - s_xsdTypes.insert( Vocabulary::XMLSchema::string(), QVariant::String ); - s_xsdTypes.insert( Vocabulary::XMLSchema::date(), QVariant::Date ); - s_xsdTypes.insert( Vocabulary::XMLSchema::time(), QVariant::Time ); - s_xsdTypes.insert( Vocabulary::XMLSchema::dateTime(), QVariant::DateTime ); - s_xsdTypes.insert( Vocabulary::XMLSchema::base64Binary(), QVariant::ByteArray ); - s_xsdTypes.insert( Vocabulary::RDF::XMLLiteral(), QVariant::String ); - } - - QHash<QUrl, QVariant::Type>::const_iterator it = s_xsdTypes.constFind( dataTypeUri ); - if ( it != s_xsdTypes.constEnd() ) { - return it.value(); - } - else { -// qDebug() << "(Soprano::LiteralValue) unknown literal type uri:" << dataTypeUri; - return QVariant::Invalid; - } + return s_xsdTypePool()->typeFromDataTypeUri(dataTypeUri); } QUrl Soprano::LiteralValue::dataTypeUriFromType( QVariant::Type type ) { - static QHash<int, QUrl> s_variantSchemaTypeHash; - if( s_variantSchemaTypeHash.isEmpty() ) { - s_variantSchemaTypeHash.insert( QVariant::Int, Vocabulary::XMLSchema::xsdInt() ); - s_variantSchemaTypeHash.insert( QVariant::LongLong, Vocabulary::XMLSchema::xsdLong() ); - s_variantSchemaTypeHash.insert( QVariant::UInt, Vocabulary::XMLSchema::unsignedInt() ); - s_variantSchemaTypeHash.insert( QVariant::ULongLong, Vocabulary::XMLSchema::unsignedLong() ); - s_variantSchemaTypeHash.insert( QVariant::Bool, Vocabulary::XMLSchema::boolean() ); - s_variantSchemaTypeHash.insert( QVariant::Double, Vocabulary::XMLSchema::xsdDouble() ); - s_variantSchemaTypeHash.insert( QVariant::String, Vocabulary::XMLSchema::string() ); - s_variantSchemaTypeHash.insert( QVariant::Date, Vocabulary::XMLSchema::date() ); - s_variantSchemaTypeHash.insert( QVariant::Time, Vocabulary::XMLSchema::time() ); - s_variantSchemaTypeHash.insert( QVariant::DateTime, Vocabulary::XMLSchema::dateTime() ); - s_variantSchemaTypeHash.insert( QVariant::ByteArray, Vocabulary::XMLSchema::base64Binary() ); - } - - return s_variantSchemaTypeHash[type]; + return s_xsdTypePool()->dataTypeUriFromType(type); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/soprano/queryresultiterator.h new/soprano-2.6.0/soprano/queryresultiterator.h --- old/soprano-2.5.63/soprano/queryresultiterator.h 2009-01-06 14:47:23.000000000 +0100 +++ new/soprano-2.6.0/soprano/queryresultiterator.h 2011-02-01 15:51:41.000000000 +0100 @@ -249,8 +249,7 @@ /** * Check if this is a boolean result. * - * There is no need to call next() for boolean results. However, for internal reasons - * backends need to always return \p true for boolean queries. + * There is no need to call next() for boolean results. * * \return \p true if this result refers to a boolean query (SPARQL ASK), i.e. * boolValue() returns a valid value. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/soprano/queryresultiteratorbackend.h new/soprano-2.6.0/soprano/queryresultiteratorbackend.h --- old/soprano-2.5.63/soprano/queryresultiteratorbackend.h 2008-10-27 14:45:52.000000000 +0100 +++ new/soprano-2.6.0/soprano/queryresultiteratorbackend.h 2011-02-01 15:51:41.000000000 +0100 @@ -2,7 +2,7 @@ * This file is part of Soprano Project. * * Copyright (C) 2006 Daniele Galdi <[email protected]> - * Copyright (C) 2007-2008 Sebastian Trueg <[email protected]> + * Copyright (C) 2007-2010 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -49,8 +49,8 @@ virtual ~QueryResultIteratorBackend(); /** - * For internal reasons each backend implementation needs to always - * return \p true for boolean results. + * For boolean results implementations needs to always return \p false to avoid + * endless loops in client applications that omit to check the result type. * * \sa QueryResultIterator::next */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/soprano/soprano.h new/soprano-2.6.0/soprano/soprano.h --- old/soprano-2.5.63/soprano/soprano.h 2009-04-29 11:33:51.000000000 +0200 +++ new/soprano-2.6.0/soprano/soprano.h 2011-02-01 15:51:41.000000000 +0100 @@ -2,7 +2,7 @@ * This file is part of Soprano Project * * Copyright (C) 2006 Daniele Galdi <[email protected]> - * Copyright (C) 2007 Sebastian Trueg <[email protected]> + * Copyright (C) 2007-2011 Sebastian Trueg <[email protected]> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -46,3 +46,4 @@ #include "dummymodel.h" #include "mutexmodel.h" #include "asyncmodel.h" +#include "graph.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/soprano-2.5.63/test/SopranoModelTest.cpp new/soprano-2.6.0/test/SopranoModelTest.cpp --- old/soprano-2.5.63/test/SopranoModelTest.cpp 2010-04-15 17:39:21.000000000 +0200 +++ new/soprano-2.6.0/test/SopranoModelTest.cpp 2011-02-01 15:51:41.000000000 +0100 @@ -546,8 +546,7 @@ QString query( "ASK where {?a ?b ?c}" ); QueryResultIterator res = m_model->executeQuery( query, Query::QueryLanguageSparql ); - QVERIFY( res.next() ); - QVERIFY( res.next() ); + QVERIFY( !res.next() ); QVERIFY( !res.isGraph() ); QVERIFY( !res.isBinding() ); @@ -555,8 +554,6 @@ QVERIFY( res.boolValue() ); - QVERIFY( res.next() ); - res.close(); QVERIFY( !res.next() ); ++++++ soprano-backend-sesame.spec.in ++++++ --- /var/tmp/diff_new_pack.ur2Zmp/_old 2011-05-19 11:51:56.000000000 +0200 +++ /var/tmp/diff_new_pack.ur2Zmp/_new 2011-05-19 11:51:56.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package soprano-backend-sesame (Version 2.4.2) +# spec file for package soprano-backend-sesame # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,20 +19,21 @@ Name: soprano-backend-sesame Url: http://soprano.sourceforge.net/ -BuildRequires: java-devel fdupes libsoprano-devel -License: GPLv2+ ; LGPLv2.1+ -Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF - Sesame backend +License: LGPLv2+ +Group: System/Libraries +Summary: Sesame backend for Soprano BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: java-devel # COMMON1-BEGIN # COMMON1-END +BuildRequires: java-devel +BuildRequires: libsoprano-devel +Requires: libsoprano4 = %{version} +Requires: java-devel Provides: soprano_backend = %{version} Provides: backend-sesame2 = %{version} -Requires: libsoprano4 = %{version} %description -This package provides a Sesame based backend for Soprano. +This package provides a Sesame based backend for Soprano. %prep # COMMON2-BEGIN @@ -40,23 +41,26 @@ %build export JAVA_HOME=%{_jvmdir}/java - %cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON - %make_jobs +%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_SESAME_BACKEND=ON +%make_jobs %install - cd build - # this uses the cmake (mis)feature of 'make' building also the dependencies outside - # the directory and its subdirectories, 'make install' not installing them - cd backends/sesame2 - %makeinstall -%if %suse_version > 1020 - %fdupes -s %{buildroot}%{_includedir} +cd build +# this uses the cmake (mis)feature of 'make' building also the dependencies outside +# the directory and its subdirectories, 'make install' not installing them +cd backends/sesame2 +%make_install +cd .. + +%if 0%{?suse_version} +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/sesame2backend.desktop %endif - cd .. +%clean +rm -rf %{buildroot} %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_datadir}/soprano/sesame2 %{_libdir}/soprano/libsoprano_sesame2backend.so %{_datadir}/soprano/plugins/sesame2backend.desktop ++++++ soprano-backend-virtuoso.spec.in ++++++ --- /var/tmp/diff_new_pack.ur2Zmp/_old 2011-05-19 11:51:56.000000000 +0200 +++ /var/tmp/diff_new_pack.ur2Zmp/_new 2011-05-19 11:51:56.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package soprano-backend-virtuoso (Version 2.4.2) +# spec file for package soprano-backend-virtuoso # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,44 +19,47 @@ Name: soprano-backend-virtuoso Url: http://soprano.sourceforge.net/ -BuildRequires: fdupes libsoprano-devel -License: GPLv2+ ; LGPLv2.1+ -Group: Development/Libraries/C and C++ -Summary: C++/Qt based interface library for RDF +License: LGPLv2+ +Group: System/Libraries +Summary: Virtuoso backend for Soprano BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libiodbc-devel # COMMON1-BEGIN # COMMON1-END -Provides: soprano_backend = %{version} -Provides: backend-virtuso = %{version} +BuildRequires: libiodbc-devel +BuildRequires: libsoprano-devel Requires: libsoprano4 = %{version} Requires: virtuoso-server +Provides: soprano_backend = %{version} +Provides: backend-virtuso = %{version} %description -Soprano Backend for the RDF QT/C++ interface library using Virtuoso for storage. +This package provides a Virtuoso based backend for Soprano. %prep # COMMON2-BEGIN # COMMON2-END %build - %cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_VIRTUOSO_BACKEND=ON - %make_jobs +%cmake_kde4 -d build -- -DCMAKE_SKIP_RPATH=OFF -DBUILD_VIRTUOSO_BACKEND=ON +%make_jobs %install - cd build - # this uses the cmake (mis)feature of 'make' building also the dependencies outside - # the directory and its subdirectories, 'make install' not installing them - cd backends/virtuoso - %makeinstall -%if %suse_version > 1020 - %fdupes -s %{buildroot}%{_includedir} +cd build +# this uses the cmake (mis)feature of 'make' building also the dependencies outside +# the directory and its subdirectories, 'make install' not installing them +cd backends/virtuoso +%make_install +cd .. + +%if 0%{?suse_version} +%suse_update_desktop_file %{buildroot}%{_datadir}/soprano/plugins/virtuosobackend.desktop %endif - cd .. +%clean +rm -rf %{buildroot} %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_libdir}/soprano/libsoprano_virtuosobackend.so %{_datadir}/soprano/plugins/virtuosobackend.desktop ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
