示例#1
0
def load_target(name, globalconf, targetconf):
    loggerfactory = logstore.get_logger_factory(targetconf, globalconf)
    suwrapper = su.get_su_wrapper(name, targetconf, globalconf)
    packagemanager = pm.get_package_manager(targetconf, globalconf)
    rootmanager = root.get_root_manager(suwrapper, targetconf,
            globalconf)
    builder = build.get_builder(rootmanager, packagemanager,
            targetconf, globalconf)
    permchecker = PermissionChecker(targetconf, globalconf)
    target = Target(name, rootmanager, packagemanager, builder,
            loggerfactory, permchecker)
    return target