示例#1
0
    def build_env_for_part(self, part, root_part=True):
        """Return a build env of all the part's dependencies."""

        env = []
        stagedir = self._project_options.stage_dir

        if root_part:
            # this has to come before any {}/usr/bin
            env += part.env(part.installdir)
            env += project_loader._runtime_env(
                part.installdir, self._project_options.arch_triplet)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)
            env += project_loader._build_env(
                part.installdir, self._project_options.arch_triplet)
            env += project_loader._build_env_for_stage(
                stagedir, self._project_options.arch_triplet)
            env.append('SNAPCRAFT_PART_INSTALL={}'.format(part.installdir))
        else:
            env += part.env(stagedir)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)

        for dep_part in part.deps:
            env += dep_part.env(stagedir)
            env += self.build_env_for_part(dep_part, root_part=False)

        return env
示例#2
0
    def build_env_for_part(self, part, root_part=True):
        """Return a build env of all the part's dependencies."""

        env = []
        stagedir = self._project_options.stage_dir

        if root_part:
            # this has to come before any {}/usr/bin
            env += part.env(part.installdir)
            env += project_loader._runtime_env(
                part.installdir, self._project_options.arch_triplet)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)
            env += project_loader._build_env(
                part.installdir, self._project_options.arch_triplet)
            env += project_loader._build_env_for_stage(
                stagedir, self._project_options.arch_triplet)
            env.append('SNAPCRAFT_PART_INSTALL={}'.format(part.installdir))
        else:
            env += part.env(stagedir)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)

        for dep_part in part.deps:
            env += dep_part.env(stagedir)
            env += self.build_env_for_part(dep_part, root_part=False)

        return env
示例#3
0
    def build_env_for_part(self, part, root_part=True):
        """Return a build env of all the part's dependencies."""

        env = []
        stagedir = self._project_options.stage_dir
        core_dynamic_linker = self._project_options.get_core_dynamic_linker()

        if root_part:
            # this has to come before any {}/usr/bin
            env += part.env(part.installdir)
            env += project_loader._runtime_env(
                part.installdir, self._project_options.arch_triplet)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)
            env += project_loader._build_env(
                part.installdir,
                self._snap_name,
                self._confinement,
                self._project_options.arch_triplet,
                core_dynamic_linker=core_dynamic_linker)
            env += project_loader._build_env_for_stage(
                stagedir,
                self._snap_name,
                self._confinement,
                self._project_options.arch_triplet,
                core_dynamic_linker=core_dynamic_linker)
            env.append('SNAPCRAFT_PART_INSTALL={}'.format(part.installdir))
            env.append('SNAPCRAFT_PARALLEL_BUILD_COUNT={}'.format(
                self._project_options.parallel_build_count))
        else:
            env += part.env(stagedir)
            env += project_loader._runtime_env(
                stagedir, self._project_options.arch_triplet)

        for dep_part in part.deps:
            env += dep_part.env(stagedir)
            env += self.build_env_for_part(dep_part, root_part=False)

        return env