From 4f757eef46e7a177c05c4de331a6cdaa1901cd2f Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sat, 4 Jan 2025 20:41:17 +0300 Subject: [PATCH] minor fix up --- .github/release-nest-v3 | 2 +- Cargo.lock | 2 +- data/scripts/get_kernel_pika.sh | 19 +++++++++++++------ debian/changelog | 2 +- src/kernel_pkg/mod.rs | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index e440e5c..bf0d87a 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -3 \ No newline at end of file +4 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 7b95c90..ca05895 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1428,7 +1428,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pika-kernel-manager" -version = "0.1.5" +version = "0.1.6" dependencies = [ "async-channel", "duct", diff --git a/data/scripts/get_kernel_pika.sh b/data/scripts/get_kernel_pika.sh index a1618e7..67d55e9 100755 --- a/data/scripts/get_kernel_pika.sh +++ b/data/scripts/get_kernel_pika.sh @@ -1,11 +1,18 @@ #! /bin/bash -if [[ "$1" == "version" ]] +if [[ "$1" == "list" ]] +then + apt list 2>&1 | cut -f1 -d'/' | grep -v dbg | grep -E "linux-image-.*-pikaos" | cut -f3- -d"-" | tr -d ' ' +elif [[ "$1" == "current_version" ]] +then + dpkg -s kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3 -d"-" | tr -d ' ' +elif [[ "$1" == "current_pkgname" ]] +then + dpkg -s kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' ' +elif [[ "$1" == "version" ]] then apt show kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3 -d"-" | tr -d ' ' -elif [[ "$1" == "list" ]] -then - apt list 2>&1 | cut -f1 -d'/' | grep -v dbg | grep -E "linux-image-.*-pikaos" | cut -f3- -d"-" | tr -d ' ' -else +elif [[ "$1" == "pkgname" ]] +then apt show kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' ' -fi \ No newline at end of file +fi diff --git a/debian/changelog b/debian/changelog index 1129611..cdda1c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -pika-kernel-manager (0.1.6-101pika1) pika; urgency=low +pika-kernel-manager (0.1.6-101pika2) pika; urgency=low * Translation Update diff --git a/src/kernel_pkg/mod.rs b/src/kernel_pkg/mod.rs index dd6b58f..56dd9aa 100644 --- a/src/kernel_pkg/mod.rs +++ b/src/kernel_pkg/mod.rs @@ -225,7 +225,7 @@ fn add_package_rows( let kernel_main_package_clone0 = kernel_main_package.clone(); let command_get_kernel_pika = Command::new("/usr/lib/pika/kernel-manager/scripts/get_kernel_pika.sh") - .arg("pkgname") + .arg("current_pkgname") .output() .unwrap(); let kernel_pika_pkg = String::from_utf8(command_get_kernel_pika.stdout).unwrap();