[Koha-cvs] CVS: koha/misc Install.pm,1.58,1.59 koha.upgrade,1.9,1.10
MJ Ray
slef at users.sourceforge.net
Mon Oct 27 18:13:09 CET 2003
Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1:/tmp/cvs-serv5026
Modified Files:
Install.pm koha.upgrade
Log Message:
Old files warning and MARC upgrade fix
Index: Install.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/Install.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** Install.pm 26 Oct 2003 13:21:19 -0000 1.58
--- Install.pm 27 Oct 2003 17:13:06 -0000 1.59
***************
*** 78,82 ****
);
! use vars qw( $kohaversion ); # set in installer.pl
use vars qw( $language ); # set in installer.pl
use vars qw( $domainname ); # set in installer.pl
--- 78,82 ----
);
! use vars qw( $kohaversion $newversion ); # set in loadconfigfile and installer.pl
use vars qw( $language ); # set in installer.pl
use vars qw( $domainname ); # set in installer.pl
***************
*** 91,96 ****
use vars qw( $dbname $hostname $user $pass ); # virtual hosting
- use vars qw( $newversion ); # XXX this seems to be unused
-
=item heading
--- 91,94 ----
***************
*** 381,385 ****
sub setkohaversion ($) {
! ($kohaversion) = @_;
}
--- 379,383 ----
sub setkohaversion ($) {
! ($newversion) = @_;
}
***************
*** 1472,1475 ****
--- 1470,1483 ----
|;
+ $messages->{'OldFiles'}->{en} = heading('OLD FILES') . qq|
+ Any files from the previous edition of Koha have been
+ copied to a dated backup directory alongside the new
+ installation. You should move any custom files that you
+ want to keep (such as your site templates) into the new
+ directories and then move the backup off of the live
+ server.
+
+ Press ENTER to continue:|;
+
$messages->{'CopyingFiles'}->{en}="Copying %s to %s.\n";
***************
*** 1527,1531 ****
opacdir=$opacdir
kohalogdir=$kohalogdir
! kohaversion=$kohaversion
httpduser=$httpduser
intrahtdocs=$intranetdir/htdocs/intranet-tmpl
--- 1535,1539 ----
opacdir=$opacdir
kohalogdir=$kohalogdir
! kohaversion=$newversion
httpduser=$httpduser
intrahtdocs=$intranetdir/htdocs/intranet-tmpl
***************
*** 1552,1555 ****
--- 1560,1565 ----
chown(0, (getpwnam($httpduser)) [3], "$intranetdir/scripts/z3950daemon/processz3950queue") or warn "can't chown $intranetdir/scripts/z3950daemon/processz3950queue: $!";
} #MJR: FIXME: Should report that we haven't chown()d.
+
+ showmessage(getmessage('OldFiles'),'PressEnter');
}
***************
*** 1730,1745 ****
}
! #FIXME: do not ask if we are upgrading from a MARC-ready system
! my $response=showmessage(getmessage('UpdateMarcTables'), 'restrictchar 12N', '1');
! startsysout();
! if ($response eq '1') {
! system("cat scripts/misc/marc_datas/marc21_en/structure_def.sql | $mysqldir/bin/mysql -u$user $dbname");
! }
! if ($response eq '2') {
! system("cat scripts/misc/marc_datas/unimarc_fr/structure_def.sql | $mysqldir/bin/mysql -u$user $dbname");
! system("cat scripts/misc/lang-datas/fr/stopwords.sql | $mysqldir/bin/mysql -u$user $dbname");
}
- delete($ENV{"KOHA_CONF"});
print RESET."\n\nFinished updating of database. Press <ENTER> to continue...";
--- 1740,1756 ----
}
! if ($kohaversion =~ /^1\.[012]\./) {
! my $response=showmessage(getmessage('UpdateMarcTables'), 'restrictchar 12N', '1');
! startsysout();
! if ($response eq '1') {
! system("cat scripts/misc/marc_datas/marc21_en/structure_def.sql | $mysqldir/bin/mysql -u$user $dbname");
! }
! if ($response eq '2') {
! system("cat scripts/misc/marc_datas/unimarc_fr/structure_def.sql | $mysqldir/bin/mysql -u$user $dbname");
! system("cat scripts/misc/lang-datas/fr/stopwords.sql | $mysqldir/bin/mysql -u$user $dbname");
! }
! delete($ENV{"KOHA_CONF"});
}
print RESET."\n\nFinished updating of database. Press <ENTER> to continue...";
Index: koha.upgrade
===================================================================
RCS file: /cvsroot/koha/koha/misc/koha.upgrade,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** koha.upgrade 26 Oct 2003 13:21:19 -0000 1.9
--- koha.upgrade 27 Oct 2003 17:13:06 -0000 1.10
***************
*** 32,65 ****
};
checkperlmodules();
backupkoha();
getapacheinfo();
installfiles();
!
! #FIXME: Copy custom templates and reports back in, or warn
!
! #opendir D, "$backupdir/kohafiles-$date/intranet/htdocs/";
! #my @dirlist=readdir D;
! #foreach (@dirlist) {
! # (next) if (/^\./);
! # (next) if ($_ eq 'default');
! # (next) if ($_ eq 'doc');
! # (next) if ($_=~/^koha-/);
! # (next) if (-e "$::intranetdir/htdocs/$_");
! # print "Restoring custom intranet templates $_...\n";
! # system("cp -a $backupdir/kohafiles-$date/intranet/htdocs/$_ $::intranetdir/htdocs/");
! #}
! #
! #opendir D, "$backupdir/kohafiles-$date/opac/htdocs/";
! #@dirlist=readdir D;
! #foreach (@dirlist) {
! # (next) if (/^\./);
! # (next) if ($_ eq 'default');
! # (next) if ($_ eq 'doc');
! # (next) if ($_=~/^koha-/);
! # (next) if (-e "$::opacdir/htdocs/$_");
! # print "Restoring custom opac template $_...\n";
! # system("cp -a $backupdir/kohafiles-$date/opac/htdocs/$_ $::opacdir/htdocs/");
! #}
updatedatabase();
finalizeconfigfile();
--- 32,41 ----
};
+ setkohaversion($::newversion);
checkperlmodules();
backupkoha();
getapacheinfo();
installfiles();
! # custom templates warning added to installfiles();
updatedatabase();
finalizeconfigfile();
More information about the Koha-cvs
mailing list