Ejemplo n.º 1
0
    def verify_bundle_name(self):
        if os.path.isfile(self.bdl_json_path):
            bundle_defs = bundles_for_config.get_bundle_definitions(
                self.bdl_json_path)
            if self.bundle_name not in [
                    os.path.splitext(x)[0] for x in bundle_defs
            ]:
                raise Exception(
                    "Error. Bundle {b} couldn't be found in {p}. Please manually add an entry for this bundle"
                    .format(b=self.bundle_name, p=self.bdl_json_path))

            bundle_list = bundles_for_config.determine_bundles_for_config(
                self.download_config, bundle_defs)
            if self.bundle_name not in bundle_list:
                raise Exception(
                    "Error. The bundle registry {p} explicitly excludes {b} for the configuration {c}. If you don't think this is correct, please fix the registry"
                    .format(p=self.bdl_json_path,
                            b=self.bundle_name,
                            c=self.download_config))
            # Do we have any build options to override?
            if "build_options" in bundle_defs[self.bundle_name + ".bdl"]:
                if "use_internal_ELF" in bundle_defs[self.bundle_name +
                                                     ".bdl"]["build_options"]:
                    if bundle_defs[
                            self.bundle_name +
                            ".bdl"]["build_options"]["use_internal_ELF"]:
                        build_name_previous = self.build_name
                        self.build_name = self.build_name.split("_external")[0]
                        logging.info(
                            "Overriding BUILD_NAME from {j}: {b1} -> {b2}".
                            format(j=os.path.basename(self.bdl_json_path),
                                   b1=build_name_previous,
                                   b2=self.build_name))
Ejemplo n.º 2
0
    def verify_bundle_name(self):
        if os.path.isfile(self.bdl_json_path):
            bundle_defs = bundles_for_config.get_bundle_definitions(
                self.bdl_json_path)
            if self.bundle_name not in [
                    os.path.splitext(x)[0] for x in bundle_defs
            ]:
                raise Exception(
                    "Error. Bundle {b} couldn't be found in {p}. Please manually add \
                    an entry for this bundle".format(b=self.bundle_name,
                                                     p=self.bdl_json_path))

                bundle_list = bundles_for_config.determine_bundles_for_config(
                    self.download_config, self.bundle_defs)
                if self.bundle_name not in bundle_list:
                    raise Exception(
                        "Error. The bundle registry {p} explicitly excludes {b} for the \
                        configuration {c}. If you don't think this is correct, please fix \
                        the registry".format(p=self.bdl_json_path,
                                             b=self.bundle_name,
                                             c=self.download_config))
Ejemplo n.º 3
0
        # For not release builds, use a special folder name, otherwise use KCSMAKER_PATH/output/<BUILD_ID>/<DOWNLOAD_CONFIG>
        if BUILD_ID == 0xFFFF:
            KCS_OUTPUT_DIR = os.path.abspath(os.path.join(KCSMAKER_PATH, "out", DOWNLOAD_CONFIG))
        else:
            KCS_OUTPUT_DIR = os.path.abspath(os.path.join(KCSMAKER_PATH, "out", str(BUILD_ID), DOWNLOAD_CONFIG))

if __name__ == "__main__":
    # This needs at least version 2.6 of Python (needs the as keyword) not checked
    # because Python dies before doing this check
    # Process command line arguments
    logging.basicConfig(filename="KCS_build.log",format='%(asctime)s %(message)s', filemode="w", level=logging.INFO)
    logging.info("Initialising KCSMaker...")
    proc_cmd_line()
    bdl_json_path = os.path.join(KYMERA_SRC_PATH, "bundle_list.json")
    if os.path.isfile(bdl_json_path):
        bundle_defs = bundles_for_config.get_bundle_definitions(bdl_json_path)
        if BUNDLE_NAME not in [os.path.splitext(x)[0] for x in bundle_defs]:
            raise Exception("Error. Bundle {b} couldn't be found in {p}. Please manually add an entry for this bundle".format(b=BUNDLE_NAME,p=os.path.join(KCSMAKER_PATH,"bundle","bundle_list.json")))
        bundle_list=bundles_for_config.determine_bundles_for_config(DOWNLOAD_CONFIG, bundle_defs)
        if BUNDLE_NAME not in bundle_list:
            raise Exception("Error. The bundle registry {p} explicitly excludes {b} for the configuration {c}. If you don't think this is correct, please fix the registry".format(b=BUNDLE_NAME,p=os.path.join(KCSMAKER_PATH,"bundle","bundle_list.json"),c=DOWNLOAD_CONFIG))
    # Can't import get_kcc_version until this point because we
    # need to get it from the target build path.
    sys.path.append(BUILD_ROOT)
    # Sort out paths for python tools
    sys.path.append(get_python_tools.python_tools_version().get_python_tools_path(OS_TYPE))
    import kalaccess
    import get_kcc_version

    # Read in the existing build info for the release
    logging.info("Loading release build info...")