summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3263896)
raw | patch | inline | side by side (parent: 3263896)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Apr 2008 14:23:41 +0000 (14:23 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Apr 2008 14:23:41 +0000 (14:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10593 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index a3fd41505f83ce0b2fa6eb197ce7ae6eb01e73de..fc98f12f7e773fd0c444fff1ee5af7a5ede841f6 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
}
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);
$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(<FILE>);
- 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(<FILE>);
+ 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;
}