diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index 56a6051..d8263ee 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -1 \ No newline at end of file +2 \ No newline at end of file diff --git a/data/check-pkg.sh b/data/check-pkg.sh new file mode 100755 index 0000000..64e64bf --- /dev/null +++ b/data/check-pkg.sh @@ -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 \ No newline at end of file diff --git a/data/modify-driver.sh b/data/modify-driver.sh index 3788111..b398904 100755 --- a/data/modify-driver.sh +++ b/data/modify-driver.sh @@ -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 diff --git a/debian/changelog b/debian/changelog index dba0e76..cb31fc4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/src/build_ui/mod.rs b/src/build_ui/mod.rs index dbc6a47..762453f 100644 --- a/src/build_ui/mod.rs +++ b/src/build_ui/mod.rs @@ -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() {