mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-15 00:34:42 +09:00
Support extra flags for package installer
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -8,6 +8,7 @@ class PackageInstallWorker:
|
||||
"remote": "<remote name>" or "local_file",
|
||||
"installation": "<installation name>",
|
||||
"package_names": ["<pkg id 1>", "<pkg id 2>", ...],
|
||||
"extra_flags": ["<flag 1>", "<flag 2>", ...],
|
||||
},
|
||||
{
|
||||
...
|
||||
@@ -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+)'
|
||||
|
||||
Reference in New Issue
Block a user