From 6f0bb784cedaee0568cf387780afb7d4fd189335 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 26 May 2008 13:56:54 +0000 Subject: [PATCH] Added more robustness when crashing on creating package lists. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11006 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 289244446..dc82ecbef 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -2210,14 +2210,25 @@ sub create_packages_list_db { close (CONFIG); find(\&cleanup_and_extract, keys( %repo_dirs )); - &main::strip_packages_list_statements(); + eval { + &main::strip_packages_list_statements(); + }; + if($@) { + daemon_log("$session_id ERROR: Preparation of statement list failed with '$@'!", 1); + } unshift @packages_list_statements, "VACUUM"; - $packages_list_db->exec_statementlist(\@packages_list_statements); + eval { + $packages_list_db->exec_statementlist(\@packages_list_statements); + }; + if($@) { + daemon_log("$session_id ERROR: Updating package_list_db failed with '$@'!", 1); + } unlink($packages_list_under_construction); daemon_log("$session_id INFO: create_packages_list_db: finished", 5); return; } + # This function should do some intensive task to minimize the db-traffic sub strip_packages_list_statements { my @existing_entries= @{$packages_list_db->exec_statement("SELECT * FROM $main::packages_list_tn")}; -- 2.30.2