コード例 #1
0
def uninstall(portal, reinstall=False):
    """Run the GS profile to install this package"""
    out = StringIO()
    if not reinstall:
        runProfile(portal, 'profile-collective.lineage:uninstall')
        _unregisterUtility(portal)
        remove_marker_ifaces(portal, (IChildSite, ISubtyped))
        print >> out, "Uninstalled collective.lineage"

    return out.getvalue()
コード例 #2
0
ファイル: Install.py プロジェクト: jean/collective.lineage
def uninstall(portal, reinstall=False):
    """Run the GS profile to install this package"""
    out = StringIO()
    if not reinstall:
        runProfile(portal, 'profile-collective.lineage:uninstall')
        _unregisterUtility(portal)
        remove_marker_ifaces(portal, (IChildSite, ISubtyped))
        print >> out, "Uninstalled collective.lineage"

    return out.getvalue()
コード例 #3
0
ファイル: sitesetup.py プロジェクト: collective/p4a.subtyper
def unsetup_portal(portal, reinstall=False, reindex=True):
    if reinstall:
        # Do nothing.
        return
    if reindex:
        # Setting marker interfaces doesn't reindex objects, so we need to
        # reindex object_provides to make sure it's up to date. If called
        # from other products that already have done this pass reindex=False.
        portal.portal_catalog.manage_reindexIndex(('object_provides', ))
    # Then we can use the removal utility to unregister all of them:
    count = utils.remove_marker_ifaces(portal, interfaces.ISubtyped)
    logger.warn('Removed ISubtyped interface from %i objects for '
                'cleanup' % count)

    sm = portal.getSiteManager()
    if sm.adapters.lookup((Interface, Interface), IContentMenuItem, u'subtypes') is not None:
        sm.unregisterAdapter(None, (Interface, Interface), IContentMenuItem, u'subtypes')
コード例 #4
0
def unsetup_portal(portal):
    count = utils.remove_marker_ifaces(portal, interfaces.ICalendarEnhanced)
    logger.warn('Removed ICalendarEnhanced interface from %i objects for '
                'cleanup' % count)
コード例 #5
0
def unsetup_portal(portal):
    count = utils.remove_marker_ifaces(portal, \
        [interfaces.IAudioEnhanced, interfaces.IAudioContainerEnhanced])
    logger.warn('Removed IAudioEnhanced and IAudioContainerEnhanced '
                'interfaces from %i objects for cleanup' % count)