Bug 37020
Удалил изврат, добавив чуть меньший изврат: Теперь в процессе установки bin-файлы не модифицируются, а только добавляется рядом с ними файл viewvcinstallpath, в котором прописываются пути. git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@539 6955db30-a419-402b-8a0d-67ecbb4d7f56remotes/github/custis
parent
4e9089255c
commit
67b205634e
|
@ -24,15 +24,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -22,15 +22,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -22,15 +22,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
# Adjust sys.path to include our library directory
|
||||
import sys
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
# Adjust sys.path to include our library directory
|
||||
import sys
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
# -*-python-*-
|
||||
#
|
||||
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
|
||||
|
@ -21,15 +22,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
# -*-python-*-
|
||||
#
|
||||
# Copyright (C) 1999-2008 The ViewCVS Group. All Rights Reserved.
|
||||
|
@ -21,15 +22,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
|
|
|
@ -26,11 +26,12 @@ Ka-Ping Yee, for the GUI code and the framework stolen from pydoc.py.
|
|||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
#
|
||||
|
||||
#########################################################################
|
||||
#
|
||||
# INSTALL-TIME CONFIGURATION
|
||||
#
|
||||
# These values will be set during the installation process. During
|
||||
# development, they will remain None.
|
||||
# development, there will be no 'viewvcinstallpath.py'
|
||||
#
|
||||
|
||||
LIBRARY_DIR = None
|
||||
CONF_PATHNAME = None
|
||||
import viewvcinstallpath
|
||||
LIBRARY_DIR = viewvcinstallpath.LIBRARY_DIR
|
||||
CONF_PATHNAME = viewvcinstallpath.CONF_PATHNAME
|
||||
|
||||
# Adjust sys.path to include our library directory
|
||||
import sys
|
||||
|
|
|
@ -4,5 +4,5 @@ VIEWVC_DIR=$1
|
|||
|
||||
test -f "$VIEWVC_DIR/.svn-updating" -o ! -f "$VIEWVC_DIR/.svn-updated" && exit 0
|
||||
mv "$VIEWVC_DIR/.svn-updated" "$VIEWVC_DIR/.svn-updating"
|
||||
"$VIEWVC_DIR/bin/svnupdate-async" "$VIEWVC_DIR/bin/svndbadmin" "$VIEWVC_DIR/.svn-updating" | sh >/dev/null
|
||||
"$VIEWVC_DIR/bin/svnupdate-async" "$VIEWVC_DIR/bin/svndbadmin" "$VIEWVC_DIR/.svn-updating" | sh &> /tmp/svnupdate-async.log
|
||||
rm "$VIEWVC_DIR/.svn-updating"
|
||||
|
|
|
@ -236,10 +236,6 @@ LEGEND
|
|||
except IOError, e:
|
||||
error(str(e))
|
||||
|
||||
# (Optionally) substitute ViewVC path variables.
|
||||
if subst_path_vars:
|
||||
contents = replace_paths(contents)
|
||||
|
||||
# Ensure the existence of the containing directories.
|
||||
dst_parent = os.path.dirname(destdir_path)
|
||||
if not os.path.exists(dst_parent):
|
||||
|
@ -428,7 +424,7 @@ Just hit [Enter] if a default is okay.
|
|||
ROOT_DIR = temp
|
||||
else:
|
||||
ROOT_DIR = default
|
||||
|
||||
|
||||
# Prompt for DESTDIR if none provided.
|
||||
if DESTDIR is None:
|
||||
default = ''
|
||||
|
@ -441,7 +437,7 @@ Just hit [Enter] if a default is okay.
|
|||
DESTDIR = temp
|
||||
else:
|
||||
DESTDIR = default
|
||||
|
||||
|
||||
# Install the files.
|
||||
print "Installing ViewVC to %s%s:" \
|
||||
% (ROOT_DIR, DESTDIR and " (DESTDIR = %s)" % (DESTDIR) or "")
|
||||
|
@ -449,7 +445,20 @@ Just hit [Enter] if a default is okay.
|
|||
apply(install_file, args)
|
||||
for args in TREE_LIST:
|
||||
apply(install_tree, args)
|
||||
|
||||
|
||||
# Write LIBRARY_DIR and CONF_PATHNAME into viewvcinstall.py config file
|
||||
viewvcinstallpath = """#!/usr/bin/python
|
||||
LIBRARY_DIR = "%s"
|
||||
CONF_PATHNAME = "%s"
|
||||
""" % (os.path.join(ROOT_DIR, 'lib'), os.path.join(ROOT_DIR, 'viewvc.conf'))
|
||||
open(os.path.join(ROOT_DIR, 'bin', 'viewvcinstallpath.py'),'wb').write(viewvcinstallpath)
|
||||
if sys.platform != 'win32':
|
||||
for i in ['cgi', 'mod_python']:
|
||||
os.symlink(os.path.join(ROOT_DIR, 'bin', 'viewvcinstallpath.py'), os.path.join(ROOT_DIR, 'bin', i, 'viewvcinstallpath.py'))
|
||||
else:
|
||||
for i in ['asp', 'cgi', 'mod_python']:
|
||||
open(os.path.join(ROOT_DIR, 'bin', i, 'viewvcinstallpath.py'),'wb').write(viewvcinstallpath)
|
||||
|
||||
# Print some final thoughts.
|
||||
print """
|
||||
|
||||
|
|
Loading…
Reference in New Issue