From 3e83051f027d03a688e09a8b713598070c76c104 Mon Sep 17 00:00:00 2001 From: weidongkl Date: Thu, 19 Sep 2024 15:34:48 +0800 Subject: [PATCH] =?UTF-8?q?sync:=20=E5=90=8C=E6=AD=A5master=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: weidongkl (cherry picked from commit 188f37c4ee1926247951aaf59765426d3a058850) --- uname-build-checks.spec | 10 ++++++++-- uname-build-checks.yaml | 4 ++++ uname.sh | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 uname-build-checks.yaml diff --git a/uname-build-checks.spec b/uname-build-checks.spec index 536bd6a..80ff0e4 100644 --- a/uname-build-checks.spec +++ b/uname-build-checks.spec @@ -4,11 +4,11 @@ Name: uname-build-checks -License: GPL v2 or later +License: GPL-2.0-or-later Group: Development/Tools/Building Summary: post checks for build after rpms have been created Version: 1.0 -Release: 0.5 +Release: 0.7 BuildRequires: kernel, rpm, coreutils Source0: uname.sh BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -55,6 +55,12 @@ fi /.oe_kernelversion %changelog +* Thu Sep 19 2024 weidongkl 1.0-0.7 +- fix: https://gitee.com/src-openeuler/uname-build-checks/issues/IAS6IX + +* Wed Jun 12 2024 yinyongkang 1.0-0.6 +- license info rectification + * Tue Jan 5 2021 shenyangyang4@huawei.com 1.0-0.5 - rename uname-build-check.spec to uname-build-checks.spec diff --git a/uname-build-checks.yaml b/uname-build-checks.yaml new file mode 100644 index 0000000..00bbaf0 --- /dev/null +++ b/uname-build-checks.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +seperator: NA diff --git a/uname.sh b/uname.sh index 9e7cafb..b5c29f8 100644 --- a/uname.sh +++ b/uname.sh @@ -4,6 +4,11 @@ OUTPUT=`uname.bin $*` NOT_INSTALLED="is not installed" if [[ $* == "-r" ]];then + lines=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel | wc -l` + if [ "$lines" -gt 1 ]; then + echo $OUTPUT + exit 0 + fi dir=`rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel | head -n 1` if [ -z "$(echo "$dir" | grep "$NOT_INSTALLED")" ]; then [ -n "$dir" ] && echo $dir && exit 0 -- Gitee