def is_installable(self): """Determine if a binary package can be installed in the currently configured SDK. Currently only packages built with the same SDK major version are installable. """ return self.BUILD_SDK_VERSION == util.get_sdk_version()
def installed_info_contents(self): """Generate content of the .info file to install based on source pkg_info file and current build configuration.""" with open(self.info) as f: info_content = f.read() info_content += 'BUILD_CONFIG=%s\n' % self.config.config_name info_content += 'BUILD_ARCH=%s\n' % self.config.arch info_content += 'BUILD_TOOLCHAIN=%s\n' % self.config.toolchain info_content += 'BUILD_SDK_VERSION=%s\n' % util.get_sdk_version() return info_content
def installable(self, package_name, config): """Returns True if the index contains the given package and it is installable in the currently configured SDK.""" info = self.packages.get((package_name, config)) if not info: return False version = util.get_sdk_version() if info['BUILD_SDK_VERSION'] != version: util.log_verbose('Prebuilt package was built with different SDK version: ' '%s vs %s' % (info['BUILD_SDK_VERSION'], version)) return False return True