Use dpkg status
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 2m14s

This commit is contained in:
Ward from fusion-voyager-3 2024-09-02 03:42:16 +03:00
parent b464a7b24f
commit 9916e48906
5 changed files with 16 additions and 5 deletions

View File

@ -1 +1 @@
5
6

View File

@ -47,5 +47,6 @@
"sched_ext_cmd_status_dialog_body_success": "SCX has been set to",
"sched_ext_cmd_status_dialog_heading_failed": "Failed!",
"sched_ext_cmd_status_dialog_body_failed": "SCX couldn't be has been set to",
"sched_ext_null_checkbutton_label": "No Scheduler selected"
"sched_ext_null_checkbutton_label": "No Scheduler selected",
"installed": "Installed!"
}

10
data/scripts/check-pkg.sh Executable file
View File

@ -0,0 +1,10 @@
#! /usr/bin/bash
export LANG=C
package=$1
if dpkg-query -W -f='${Status}' $package 2>/dev/null | grep -q "install ok installed"
then
exit 0
else
exit 1
fi

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
pika-kernel-manager (0.1.3-101pika4) pika; urgency=low
pika-kernel-manager (0.1.3-101pika5) pika; urgency=low
* Initial Release

View File

@ -223,8 +223,8 @@ fn add_package_rows(
let kernel_main_package_clone0 = kernel_main_package.clone();
std::thread::spawn(move || loop {
let command_installed_status = Command::new("dpkg")
.args(["-s", &kernel_main_package_clone0])
let command_installed_status = Command::new("/usr/lib/pika/kernel-manager/scripts/check-pkg.sh")
.arg(&kernel_main_package_clone0)
.output()
.unwrap();
let command_get_kernel_pika = Command::new("/usr/lib/pika/kernel-manager/scripts/get_kernel_pika.sh")