Hey,
attached is a patch for the trivial parts of this bugreport. Only
missing part is the support for Extension files instead of folders.
i can commit the patch to the zope-common svn trunk if that's ok.
greetings,
jonas
diff -rNu trunk/debian/postinst trunk.new/debian/postinst
--- trunk/debian/postinst 2007-05-13 16:18:46.000000000 +0200
+++ trunk.new/debian/postinst 2008-11-11 01:06:48.000000000 +0100
@@ -26,6 +26,7 @@
if [ ! -d $LOCALDIR ]; then
if mkdir $LOCALDIR 2>/dev/null ; then
mkdir $LOCALDIR/Products
+ mkdir $LOCALDIR/Extensions
chmod 2775 $LOCALDIR -R
chown root:$zopegroup $LOCALDIR -R
fi
diff -rNu trunk/dzhandle trunk.new/dzhandle
--- trunk/dzhandle 2008-11-11 01:04:44.000000000 +0100
+++ trunk.new/dzhandle 2008-11-11 01:24:17.000000000 +0100
@@ -373,7 +373,6 @@
kind = 'extension'
subdir = 'Extensions'
dzname = '.dzextension'
- list_on_help = False
class Product(ProductAttributes, Addon):
pass
@@ -797,7 +796,6 @@
class DZPostrmExtension(ExtensionAttributes, DZPostrm):
name = 'postrm-%s' % ExtensionAttributes.kind
help = 'handle postrm of a packaged %s' % ExtensionAttributes.kind
- list_on_help = False
register_action(DZPostrmProduct)
register_action(DZPostrmExtension)
@@ -1072,7 +1070,6 @@
class DZAddExtension(ExtensionAttributes, DZAddAddon):
name = 'add-extension'
help = 'add an extension to an instance'
- list_on_help = False
register_action(DZAddProduct)
register_action(DZAddExtension)
@@ -1170,7 +1167,6 @@
class DZRemoveExtension(ExtensionAttributes, DZRemoveAddon):
name = 'remove-extension'
help = 'remove an extension from an instance'
- list_on_help = False
register_action(DZRemoveProduct)
register_action(DZRemoveExtension)
@@ -1185,7 +1181,7 @@
def check_args(self, global_options):
if not self.args:
- # list available products
+ # list available products/extensions
self.instance = None
elif len(self.args) == 1:
try:
@@ -1199,23 +1195,24 @@
def run(self, global_options):
if self.instance:
- print 'Listing products installed for instance', self.instance.name
+ print "Listing %ss installed for instance" % (self.type), self.instance.name
addons = self.instance.installed_addons()
else:
if len(global_options.zversion) > 1:
- print 'Listing products available for all version(s):', ' '.join(global_options.zversion)
+ print "Listing %ss available for all version(s):" % (self.type), ' '.join(global_options.zversion)
addons = locate_addons(self.addonClass, zopeversions=global_options.zversion)
for addon in addons:
addon.printit()
class DZListProducts(ProductAttributes, DZListAddons):
name = 'list-products'
+ type = 'product'
help = 'show all products managed by dzhandle'
class DZListExtensions(ExtensionAttributes, DZListAddons):
name = 'list-extensions'
+ type = 'extension'
help = 'show all extensions managed by dzhandle'
- list_on_help = False
register_action(DZListProducts)
register_action(DZListExtensions)