From 8d5239856d14e4915553ad519160235d31fc6d74 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 21 Apr 2008 14:23:41 +0000 Subject: [PATCH] The latest fixes. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10593 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 55 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index a3fd41505..fc98f12f7 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -2214,7 +2214,7 @@ sub parse_package { } close( $PACKAGES ); -# unlink( "$path.in" ); + unlink( "$path.in" ); &main::daemon_log("$session_id DEBUG: unlink '$path.in'", 1); my $len_sql_list = @sql_list; &main::daemon_log("$session_id DEBUG: add $len_sql_list insert-statements to packages_list_db", 5); @@ -2233,42 +2233,43 @@ sub store_fileinfo { $repo_files{ "${srvdir}/$file" } = \%fileinfo; } -sub cleanup_and_extract { - my ($session_id) = @_; - if (not defined $session_id) { $session_id = 0; } - my $fileinfo = $repo_files{ $File::Find::name }; - if( defined $fileinfo ) { +sub cleanup_and_extract { + my $fileinfo = $repo_files{ $File::Find::name }; - my $dir = "$outdir/$fileinfo->{ 'dist' }/debconf.d"; - my $sql; - my $package = $fileinfo->{ 'package' }; - my $newver = $fileinfo->{ 'version' }; + if( defined $fileinfo ) { - mkpath($dir); - system( "dpkg -e '$File::Find::name' '$dir/DEBIAN'" ); + my $dir = "$outdir/$fileinfo->{ 'dist' }/debconf.d"; + my $sql; + my $package = $fileinfo->{ 'package' }; + my $newver = $fileinfo->{ 'version' }; - if( -f "$dir/DEBIAN/templates" ) { + mkpath($dir); + system( "dpkg -e '$File::Find::name' '$dir/DEBIAN'" ); - daemon_log("$session_id DEBUG: Found debconf templates in '$package' - $newver", 5); + if( -f "$dir/DEBIAN/templates" ) { - my $tmpl= ""; - { - local $/=undef; - open FILE, "$dir/DEBIAN/templates"; - $tmpl = &encode_base64(); - close FILE; - } - rmtree("$dir/DEBIAN/templates"); + daemon_log("DEBUG: Found debconf templates in '$package' - $newver", 5); - $sql= "update $main::packages_list_tn set template = '$tmpl' where package = '$package' and version = '$newver';"; + my $tmpl= ""; + { + local $/=undef; + open FILE, "$dir/DEBIAN/templates"; + $tmpl = &encode_base64(); + close FILE; + } + rmtree("$dir/DEBIAN/templates"); - } else { - $sql= "update $main::packages_list_tn set template = '' where package = '$package' and version = '$newver';"; - } + $sql= "update $main::packages_list_tn set template = '$tmpl' where package = '$package' and version = '$newver';"; - my $res= $main::packages_list_db->update_dbentry($sql); + } else { + $sql= "update $main::packages_list_tn set template = '' where package = '$package' and version = '$newver';"; } + + my $res= $main::packages_list_db->update_dbentry($sql); + } + + return; } -- 2.30.2