From 12b9483362f97daabd1c1ff59a18f9bb42560797 Mon Sep 17 00:00:00 2001 From: heliguy4599 Date: Thu, 10 Oct 2024 22:59:48 -0400 Subject: [PATCH] Support extra flags for package installer --- src/gtk/attempt_install_dialog.py | 1 + src/install_page/select_page.py | 1 + src/package_install_worker.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gtk/attempt_install_dialog.py b/src/gtk/attempt_install_dialog.py index 696fc73..f367634 100644 --- a/src/gtk/attempt_install_dialog.py +++ b/src/gtk/attempt_install_dialog.py @@ -50,6 +50,7 @@ class AttemptInstallDialog(Adw.AlertDialog): "remote": row.remote_name, "installation": row.remote_installation, "package_names": self.package_names, + "extra_flags": [], }]) elif not self.callback is None: self.callback(False) diff --git a/src/install_page/select_page.py b/src/install_page/select_page.py index 8af3927..4f0c73d 100644 --- a/src/install_page/select_page.py +++ b/src/install_page/select_page.py @@ -45,6 +45,7 @@ class SelectPage(Adw.NavigationPage): "remote": "local_file", "installation": installation, "package_names": [file.get_path()], + "extra_flags": [], }) install_page.install_packages(requests) diff --git a/src/package_install_worker.py b/src/package_install_worker.py index fc18717..a200874 100644 --- a/src/package_install_worker.py +++ b/src/package_install_worker.py @@ -8,6 +8,7 @@ class PackageInstallWorker: "remote": "" or "local_file", "installation": "", "package_names": ["", "", ...], + "extra_flags": ["", "", ...], }, { ... @@ -56,7 +57,7 @@ class PackageInstallWorker: if group['remote'] != "local_file": cmd.append(group['remote']) - cmd += [real_installation] + group['package_names'] + cmd += [real_installation] + group['package_names'] + group['extra_flags'] this.process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) percent_pattern = r'\d{1,3}%' amount_pattern = r'(\d+)/(\d+)'