Previously Jens W. Klein wrote:
> Raphael Ritz wrote:
>
> > Wichert Akkerman wrote:
> >
> > [..]
> >
> >>
> >> It wasn't working, but the breakage was silent and different. AGX needs
> >> to use the non-deprecated UI, which fixes both this bug and the
> >> deprecation warning you currently see.
> >>
> >
> > I strongly agree with Wichert here.
> >
> > While it might have seemed to work previously it was just calling
> > for trouble later on.
> >
> > I also agree that AGX is the right place to fix this.
> >
> > The only thing I'm not sure about is whether we need to care
> > for backwards compatibility. If so, then something like
> >
> > def install(self):
> > out = StringIO()
> >
> > tool=getToolByName(self, "portal_setup")
> >
> > if getFSVersionTuple()[:3]>=(3,0,0):
> > tool.runAllImportStepsFromProfile(
> > "profile-Products.PloneSVNaccess:default",
> > purge_old=False)
> > else:
> > plone_base_profileid = "profile-CMFPlone:plone"
> > tool.setImportContext(plone_base_profileid)
> > tool.setImportContext("profile-Products.PloneSVNaccess:default")
> > tool.runAllImportSteps(purge_old=False)
> > tool.setImportContext(plone_base_profileid)
> >
> > print >> out, "Successfully installed %s" % PROJECTNAME
> >
> > return out.getvalue()
> >
> > (copied from my local repository but originally shamelessly stolen from
> > one of Wichert's products :-) )
> >
> > might do it. (obviously, AGX would have to get the profile name right
> > but that's already the case anyway)
>
> If this is adviced best practice I agree to include it in AGX 2.0.
>
> But does it mean we have to introduce Exentsions/install.py again? Can't
> we deal all this from within a setuphandler (import step)?
There is no reason you can't use that same code in a setuphandler. The
important thing is that you use that specific code instead of code AGX
currently produces.
Wichert.
--
Wichert Akkerman <
[hidden email]> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers