コード例 #1
0
 def install_with_task(self):
     """Install the payload."""
     if url_target_is_tarfile(self._url):
         return InstallFromTarTask(self.image_path, conf.target.system_root,
                                   self.kernel_version_list)
     else:
         return InstallFromImageTask(conf.target.system_root,
                                     self.kernel_version_list)
コード例 #2
0
ファイル: live_image.py プロジェクト: tuan-hoang1/anaconda
    def update_kernel_version_list(self):
        """Update list of kernel versions."""
        if url_target_is_tarfile(self._url):
            if not os.path.exists(self.image_path):
                raise SourceSetupError("Failed to find tarfile image")
            kernel_version_list = get_kernel_version_list_from_tar(self.image_path)
        else:
            kernel_version_list = get_kernel_version_list(INSTALL_TREE)

        self.set_kernel_version_list(kernel_version_list)
コード例 #3
0
ファイル: live_image.py プロジェクト: tuan-hoang1/anaconda
 def install_with_task(self):
     """Install the payload."""
     if url_target_is_tarfile(self._url):
         task = InstallFromTarTask(
             self.image_path,
             conf.target.system_root,
             self.kernel_version_list
         )
     else:
         task = InstallFromImageTask(
             conf.target.system_root,
             self.kernel_version_list
         )
     return self.publish_task(LIVE_IMAGE_HANDLER.namespace, task)
コード例 #4
0
ファイル: initialization.py プロジェクト: m4d3bug/anaconda
    def run(self):
        """Run tear down of installation source image."""
        if not url_target_is_tarfile(self._url):
            unmount(self._image_mount_point, raise_exc=True)
            #FIXME: Payload and LiveOS stuff
            # FIXME: do we need a task for this?
            if os.path.exists(IMAGE_DIR + "/LiveOS"):
                # FIXME: catch and pass the exception
                unmount(IMAGE_DIR, raise_exc=True)
                os.rmdir(IMAGE_DIR)

        if not get_local_image_path_from_url(self._url):
            if os.path.exists(self._image_path):
                os.unlink(self._image_path)
コード例 #5
0
ファイル: initialization.py プロジェクト: m4d3bug/anaconda
    def run(self):
        """Run set up or installation source."""
        image_path_from_url = get_local_image_path_from_url(self._url)
        if image_path_from_url:
            self._image_path = image_path_from_url
        else:
            self._download_image(self._url, self._image_path, self._session)

        # TODO - do we use it at all in LiveImage
        ## Used to make install progress % look correct
        #self._adj_size = os.stat(self.image_path)[stat.ST_SIZE]

        if self._checksum:
            self._check_image_sum(self._image_path, self._checksum)

        if not url_target_is_tarfile(self._url):
            self._mount_image(self._image_path, self._image_mount_point)

        log.debug("Source image file path: %s", self._image_path)
        return self._image_path