def _stage_pkg(self):
        """copy package file into AMI volume.
        """
        context = self._config.context
        context.package.file = os.path.basename(context.package.arg)
        context.package.full_path = os.path.join(self._distro._mountpoint, context.package.dir.lstrip('/'), context.package.file)
        try:
            if any(protocol in context.package.arg for protocol in ['http://', 'https://']):
                self._download_pkg(context)
            else:
                self._move_pkg(context)
        except Exception:
            errstr = 'Exception encountered while staging package'
            log.critical(errstr)
            log.debug(errstr, exc_info=True)
            return False
            # reset to chrooted file path
        context.package.arg = os.path.join(context.package.dir, context.package.file)
        return True
dataset/ETHPy150Open Netflix/aminator/aminator/plugins/provisioner/base.py/BaseProvisionerPlugin._stage_pkg/original