def dependency_spec
      spec = {}

      @dependencies.each do |dependency|
        unless dependency.compiled?
          raise DirectorError,
                'Cannot generate package dependency spec ' \
                "for '#{@package.name}', " \
                "'#{dependency.package.name}' hasn't been compiled yet"
        end

        compiled_package = dependency.compiled_package

        spec[compiled_package.name] = {
          'name' => compiled_package.name,
          'version' => "#{compiled_package.version}.#{compiled_package.build}",
          'sha1' => compiled_package.sha1,
          'blobstore_id' => compiled_package.blobstore_id,
        }
      end

      spec
    end
def dependency_spec
      spec = {}

      @dependencies.each do |dependency|
        unless dependency.compiled?
          raise DirectorError,
                'Cannot generate package dependency spec ' \
                "for '#{@package.name}', " \
                "'#{dependency.package.name}' hasn't been compiled yet"
        end

        compiled_package = dependency.compiled_package

        spec[compiled_package.name] = {
          'name' => compiled_package.name,
          'version' => "#{compiled_package.version}.#{compiled_package.build}",
          'sha1' => compiled_package.sha1,
          'blobstore_id' => compiled_package.blobstore_id,
        }
      end

      spec
    end
This call only makes sense if all dependencies have already been compiled,
 otherwise it raises an exception
 @return [Hash] Hash representation of all package dependencies. Agent uses
   that to download package dependencies before compiling the package on a
   compilation VM.