예제 #1
0
    def run(self):
        """Find the size of flatpaks to install.

        :return: the required size in bytes
        :rtype: int
        """
        flatpak_payload = FlatpakManager(self._sysroot)

        try:
            # Initialize temporal repo to enable reading of the remote
            flatpak_payload.initialize_with_path("/var/tmp/anaconda-flatpak-temp")

            # Return the size in bytes.
            required_size = Size(flatpak_payload.get_required_size())
            return required_size.get_bytes()

        finally:
            # Clean up temporal repo again
            flatpak_payload.cleanup()