r1045 - in zope-common (trunk trunk/debian/changelog trunk/dzhandle)
Bernd Zeimetz
bzed-guest at alioth.debian.org
Thu Nov 29 17:47:02 UTC 2007
Date: Thursday, November 29, 2007 @ 17:47:02
Author: bzed-guest
Revision: 1045
* Finally implement removing+reinstalling Zeo and Zope instances.
(Closes: #429393, #431604)
Modified:
zope-common/trunk/ (properties)
zope-common/trunk/debian/changelog
zope-common/trunk/dzhandle
Property changes on: zope-common/trunk
___________________________________________________________________
Name: svn:ignore
+ dzhandle.py
Modified: zope-common/trunk/debian/changelog
===================================================================
--- zope-common/trunk/debian/changelog 2007-11-29 13:03:00 UTC (rev 1044)
+++ zope-common/trunk/debian/changelog 2007-11-29 17:47:02 UTC (rev 1045)
@@ -1,5 +1,6 @@
zope-common (0.5.38) unstable; urgency=low
+ [ Fabio Tranchitella ]
* Debconf templates and debian/control reviewed by the debian-l10n-
english team as part of the Smith review project. (Closes: #433712)
* Debconf translation updates:
@@ -10,8 +11,12 @@
- German. (Closes: #435273)
- Czech. (Closes: #436282)
- -- Fabio Tranchitella <kobold at debian.org> Thu, 29 Nov 2007 13:00:58 +0100
+ [ Bernd Zeimetz ]
+ * Finally implement removing+reinstalling Zeo and Zope instances.
+ (Closes: #429393, #431604)
+ -- Bernd Zeimetz <bernd at bzed.de> Thu, 29 Nov 2007 18:42:43 +0100
+
zope-common (0.5.37) unstable; urgency=low
* Updating the German debconf template translation, thanks to
Modified: zope-common/trunk/dzhandle
===================================================================
--- zope-common/trunk/dzhandle 2007-11-29 13:03:00 UTC (rev 1044)
+++ zope-common/trunk/dzhandle 2007-11-29 17:47:02 UTC (rev 1045)
@@ -1501,11 +1501,16 @@
self.instance_home = os.path.join(self.zope['instance'], self.instance_name)
else:
self.instance_home = os.path.join(personal_conf['instances'], self.zope['name'], self.instance_name)
- if os.path.exists(self.instance_home):
+ if os.path.exists(self.instance_home) and \
+ not os.path.exists(os.path.join(self.instance_home, 'bin', 'zopectl.disabled')):
self.error("instance home `%s' already exists" % self.instance_home)
return self.errors_occured
def run(self, global_options):
+ zopectl = os.path.join(self.instance_home, 'bin', 'zopectl')
+ if os.path.exists(zopectl + '.disabled'):
+ os.rename(zopectl + '.disabled', zopectl)
+ return
if self.zversion.startswith('2.'):
cmd = [os.path.join(self.zope['prefix'], 'bin', 'mkzopeinstance.py')]
else:
@@ -1599,11 +1604,17 @@
self.instance_home = os.path.join(self.zope['zeoinstance'], self.instance_name)
else:
self.instance_home = os.path.join(personal_conf['zeoinstances'], self.zope['name'], self.instance_name)
- if os.path.exists(self.instance_home):
+ if os.path.exists(self.instance_home) and \
+ not os.path.exists(os.path.join(self.instance_home, 'bin', 'zeoctl.disabled')):
self.error("instance home `%s' already exists" % self.instance_home)
return self.errors_occured
def run(self, global_options):
+ zeoctl = os.path.join(self.instance_home, 'bin', 'zeoctl')
+ if os.path.exists(zeoctl + '.disabled'):
+ os.rename(zeoctl + '.disabled', zeoctl)
+ return
+
if self.zversion.startswith('2.'):
cmd = [os.path.join(self.zope['prefix'], 'bin', 'mkzeoinstance.py')]
else:
@@ -1631,21 +1642,15 @@
try:
self.instance = locate_instance(self.args[0],
versions=global_options.zversion)
+ if self.instance.is_removed:
+ self.error("Zope instance `%s' is already removed" % self.instance.name)
except DZError, msg:
self.error(msg)
return self.errors_occured
def run(self, global_options):
- cmd = ["rm", "-rf",
- self.instance.home + "/Products",
- self.instance.home + "/Extensions",
- self.instance.home + "/lib",
- self.instance.home + "/bin",
- self.instance.home + "/inituser",
- ]
- rv = subprocess.call(cmd)
- if rv:
- sys.exit(rv)
+ os.rename(os.path.join(self.instance.home, 'bin', 'zopectl'),
+ os.path.join(self.instance.home, 'bin', 'zopectl.disabled'))
register_action(DZRemoveInstance)
@@ -1660,17 +1665,15 @@
try:
self.instance = locate_zeoinstance(self.args[0],
versions=global_options.zversion)
+ if self.instance.is_removed:
+ self.error("ZEO instance `%s' is already removed" % self.instance.name)
except DZError, msg:
self.error(msg)
return self.errors_occured
def run(self, global_options):
- cmd = ["rm", "-rf",
- self.instance.home + "/bin",
- ]
- rv = subprocess.call(cmd)
- if rv:
- sys.exit(rv)
+ os.rename(os.path.join(self.instance.home, 'bin', 'zeoctl'),
+ os.path.join(self.instance.home, 'bin', 'zeoctl.disabled'))
register_action(DZRemoveZEOInstance)
More information about the pkg-zope-commits
mailing list