From a6bbb1482c294008faf960ff3ee230b30422eaa1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 7 Apr 2005 23:35:15 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5797 --- checkin_notes | 10 ++++++++++ py/Boinc/setup_project.py | 18 +++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index 33982eea00..61b51dad75 100755 --- a/checkin_notes +++ b/checkin_notes @@ -26824,3 +26824,13 @@ David 6 April 2005 client/ http.C,h + +David 6 April 2005 + - Python: in install_boinc_files(): don't copy "sample" php files, + since this is called from "upgrade" and it would overwrite + existing files. + Move the copies to install_project(), + which is used only at project creation. + + py/Boinc/ + setup_project.py diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 3cd20e7998..38c700f063 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -306,6 +306,9 @@ def create_project_dirs(dest_dir): ]) def install_boinc_files(dest_dir): + """Copy files from source dir to project dir. + Used by the upgrade script, so don't overwrite sample files.""" + def dir(*dirs): return apply(os.path.join,(dest_dir,)+dirs) @@ -345,15 +348,6 @@ def install_boinc_files(dest_dir): 'boincxml.py', 'configxml.py', 'database.py', 'db_base.py', 'db_mid.py', 'projectxml.py', 'sched_messages.py', 'tools.py', 'util.py', 'version.py' ]) - install( - srcdir('html/user', 'forum_sample_index.php'), - dir('html/user', 'forum_index.php')) - install( - srcdir('html/user', 'sample_rss_main.php'), - dir('html/user', 'rss_main.php')) - install( - srcdir('html/user', 'sample_status.php'), - dir('html/user', 'status.php')) class Project: @@ -464,6 +458,12 @@ class Project: self.dir('html/project/project_news.inc')) install(srcdir('html/project.sample/cache_parameters.inc'), self.dir('html/project/cache_parameters.inc')) + install(srcdir('html/user', 'forum_sample_index.php'), + dir('html/user', 'forum_index.php')) + install(srcdir('html/user', 'sample_rss_main.php'), + dir('html/user', 'rss_main.php')) + install(srcdir('html/user', 'sample_status.php'), + dir('html/user', 'status.php')) my_symlink(self.config.config.download_dir, self.dir('html', 'user', 'download'))