def populate_cache_entries()

in ftl/common/cache_runner.py [0:0]


    def populate_cache_entries(self, existing_entries):
        # for each package, either verify it is already in the cache,
        # or build the image and push it to the cache
        for package in self._packages:
            if package:
                try:
                    name = None
                    version = None
                    if self._language == PHP:
                        name, version = package.split(':')
                    elif self._language == PYTHON:
                        name, version = package.split('==')
                    if name not in existing_entries:
                        # builder._pip_install() expects the double equals
                        # on the version
                        self._build_image_and_push(name, '==' + version)
                except ValueError:
                    logging.error(
                        'Encountered malformed package: {0}'.format(package))