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

This commit is contained in:
Ward from fusion-voyager-3 2024-09-02 03:50:07 +03:00
parent 60d904b9a1
commit 707589ec6a
5 changed files with 16 additions and 6 deletions

View File

@ -1 +1 @@
1
2

10
data/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

View File

@ -37,7 +37,7 @@ then
pkg="$1"
fi
if dpkg -s "$1"
if /usr/lib/pika/drivers/check-pkg.sh "$1"
then
if echo $pkg | grep -i mesa
then
@ -94,7 +94,7 @@ then
pkg="$1"
fi
if dpkg -s "$1"
if /usr/lib/pika/drivers/check-pkg.sh "$1"
then
if echo $pkg | grep -i mesa
then

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
pika-drivers (1.0.0-101pika1) pika; urgency=medium
pika-drivers (1.0.0-101pika2) pika; urgency=medium
* Update for PikaOS 4

View File

@ -326,8 +326,8 @@ fn get_drivers(
let driver_package_removeble = driver.removeble.to_owned();
gio::spawn_blocking(move || loop {
let command_installed_status = Command::new("dpkg")
.args(["-s", &driver_package_ind2])
let command_installed_status = Command::new("/usr/lib/pika/drivers/check-pkg.sh")
.arg(&driver_package_ind2)
.output()
.unwrap();
if command_installed_status.status.success() {