Update of /cvsroot/sitesampler/sitesampler/support
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25242/sitesampler/support
Modified Files:
SiteSampler_Installation.pm SiteSampler_InstConfig.pm
Log Message:
Directories were created with very strange permissions, apparently, because of quotes around creation mode
Index: SiteSampler_Installation.pm
===================================================================
RCS file: /cvsroot/sitesampler/sitesampler/support/SiteSampler_Installation.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SiteSampler_Installation.pm 30 Jul 2005 08:44:58 -0000 1.1
--- SiteSampler_Installation.pm 30 Jul 2005 09:58:43 -0000 1.2
***************
*** 92,96 ****
#cgi script installation comes with three stages: creation(modification),
! #copying(actual installation), and testing; these are happening in these:
#fill_config commit_install and audit_install;
$self->isWithScript ? $self->init_cgi_script : 0;
--- 92,96 ----
#cgi script installation comes with three stages: creation(modification),
! #copying(actual installation), and testing; these are happening in stages:
#fill_config commit_install and audit_install;
$self->isWithScript ? $self->init_cgi_script : 0;
Index: SiteSampler_InstConfig.pm
===================================================================
RCS file: /cvsroot/sitesampler/sitesampler/support/SiteSampler_InstConfig.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SiteSampler_InstConfig.pm 30 Jul 2005 08:44:58 -0000 1.1
--- SiteSampler_InstConfig.pm 30 Jul 2005 09:58:43 -0000 1.2
***************
*** 12,15 ****
--- 12,16 ----
use DBI;
+ use Data::Dumper;
sub new {
***************
*** 302,306 ****
}
! sub default_creation_mode{'0755'}
sub dbh{
--- 303,307 ----
}
! sub default_creation_mode{ return 0755}
sub dbh{
***************
*** 327,349 ****
sub dbh_key{ 'db_connection handle' }
sub load_sql{
my $self = shift;
my $dbh = $self->dbh;
! my $sqlFile = FileHandle->new
! or die(qq|Could not create file handle for the SQL file sitesampler.sql|);
! my $schema_file = File::Spec->catfile($self->{$self->support_path_key}, );
! $sqlFile->open($schema_file,'<')
! or die qq|Could not open the file $schema_file: $!|;
! my @sql = <$sqlFile>;
! $sqlFile->close;
! my $query = join ' ', @sql;
! my $dbname = $self->get_set($self->dbname_key);
! $query =~ s/postgres/$dbname/;
! my $res = $dbh->do("$query;") if $query;
! $self->db_err_check;
$dbh->disconnect;
$self->unset_dbh;
return 1;
! }
sub writeCore{
--- 328,362 ----
sub dbh_key{ 'db_connection handle' }
+ sub list_sql_files{
+ my $self = shift;
+ my $schema_file = File::Spec->catfile($self->{$self->support_path_key}, 'sitesampler.schema.sql' );
+ my $updates_file = File::Spec->catfile( ($self->{$self->support_path_key}), 'sitesampler.updates.sql' );
+ my $initdata_sql = File::Spec->catfile( ($self->{$self->support_path_key}), 'sitesampler.init.sql' );
+ my @retval = ($schema_file, $updates_file, $initdata_sql);
+ return ( \@retval );
+ }
+
sub load_sql{
my $self = shift;
my $dbh = $self->dbh;
! print Dumper($self->list_sql_files);
! for my $sqlfile( @{ $self->list_sql_files }){
! print qq|sql file is : |, $sqlfile,qq|\n|;
! my $sqlFile = FileHandle->new
! or die(qq|Could not create file handle for the SQL file : $!|);
! $sqlFile->open($sqlfile,'<')
! or die qq|Could not open the file $sqlfile: $!|;
! my @sql = <$sqlFile>;
! $sqlFile->close; undef $sqlFile;
! my $query = join ' ', @sql;
! my $dbname = $self->get_set($self->dbname_key);
! $query =~ s/postgres/$dbname/;
! my $res = $dbh->do("$query;") if $query;
! $self->db_err_check;
! }
$dbh->disconnect;
$self->unset_dbh;
return 1;
! }
sub writeCore{
|