Use dpkg status check
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 1m46s
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 1m46s
This commit is contained in:
parent
fcee87ce46
commit
7f4683c653
2
.github/release-nest-v3
vendored
2
.github/release-nest-v3
vendored
@ -1 +1 @@
|
|||||||
5
|
6
|
10
data/scripts/check-pkg.sh
Executable file
10
data/scripts/check-pkg.sh
Executable 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
|
@ -19,7 +19,7 @@ INSTALLED="no"
|
|||||||
|
|
||||||
package_check() {
|
package_check() {
|
||||||
# Check if codecs are already installed
|
# Check if codecs are already installed
|
||||||
dpkg -s pika-codecs-meta
|
/usr/lib/pika/pika-welcome/scripts/check-pkg.sh pika-codecs-meta
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
export INSTALLED="yes"
|
export INSTALLED="yes"
|
||||||
fi
|
fi
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
pika-welcome (5.0.0-101pika3) pika; urgency=low
|
pika-welcome (5.0.0-101pika4) pika; urgency=low
|
||||||
|
|
||||||
* Port to PikaOS 4
|
* Port to PikaOS 4
|
||||||
|
|
||||||
|
@ -156,8 +156,7 @@ pub fn recommended_addons_page(
|
|||||||
|
|
||||||
gio::spawn_blocking(
|
gio::spawn_blocking(
|
||||||
clone!(@strong checkpkg_status_loop_sender, @strong entry_checkpkg => move || loop {
|
clone!(@strong checkpkg_status_loop_sender, @strong entry_checkpkg => move || loop {
|
||||||
let checkpkg_command = Command::new("dpkg")
|
let checkpkg_command = Command::new("/usr/lib/pika/pika-welcome/scripts/check-pkg.sh")
|
||||||
.arg("-s")
|
|
||||||
.arg(&entry_checkpkg)
|
.arg(&entry_checkpkg)
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to execute process");
|
.expect("failed to execute process");
|
||||||
|
Loading…
Reference in New Issue
Block a user