Wichert Akkerman wrote:
[..]


1. I might be missing the obvious but I don't see
  the 'BrokenProduct' you mention in the review bundle.

Seems I forgot to commit that part. Oops. I have added it now.


Got it now. Thanks.

2. Not sure it's the best possible UI to completely hide a
product if a dependency is missing. Maybe it would be
more helpful to list the product as broken and tell the
reason so people won't start asking questions why the
add-on they just installed doesn't show up on the products
configlet. IIRC we do (did?) something similar when the
install is broken (typically because of a typo) at least
when running in debug mode (which I was while testing).

I'ld like some input from Hanno on that. What I did was update the isInstallable method in the quickinstaller tool, which seemed the logical place to put it and makes sure all the standard APIs and code paths do the right thing. QI has never had a user interface or API that communicates why a product is not installable and I'm not sure what the best way to add this is.


Well, for testing purposes I just deliberately introduced a typo
in the PloneLanguageTool (of Plone 2.5.4 to demonstrate that
this is not new; removed a colon in line 60) and in 'prefs_install_products_form'
I get:

Broken products
Some products were found to have errors when compiling the install file.

   * PloneLanguageTool

     Error Type
         exceptions.SyntaxError
     Error Value
         invalid syntax (Install.py, line 60)








That's what I meant.

Along the same line we could just list products with broken dependencies
here as well as they are checked anyway.

The code for this lives in the QI tool's

 getInstallMethod

which BTW is called by 'isProductInstallable'.

There is also a helper method

 getBrokenInstalls

to get at the contents of the errors dict
where this info is collected.
Without having tested this I would assume at
the moment that it should suffice to add products
with broken dependencies to the tool's errors dict.


Raphael



_______________________________________________
Framework-Team mailing list
Framework-Team@lists.plone.org
http://lists.plone.org/mailman/listinfo/framework-team

Reply via email to