!15 obs-server:correct usage info when exec 'obs_serverstatus' without other pargs

From: @liuzhiqiang26
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-09-19 09:51:04 +08:00 committed by Gitee
commit 184269f54b
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 7da5dc099e9d4f170e35c87e2f2dd7a0a38180b3 Mon Sep 17 00:00:00 2001
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Date: Fri, 18 Sep 2020 15:17:38 +0800
Subject: [PATCH] obs_server: fix usage info
when we exec 'obs_serverstatus' command without other pargs,
the return usage message is 'Usage: bs_serverstatus [--top] <statusfile>'.
However, the 'bs_serverstatus' is different with input 'obs_serverstatus'.
Here, we change the usage info to 'Usage: obs_serverstatus [--top] <statusfile>'.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
---
src/backend/bs_serverstatus | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/bs_serverstatus b/src/backend/bs_serverstatus
index 0ec50b3..139f15e 100755
--- a/src/backend/bs_serverstatus
+++ b/src/backend/bs_serverstatus
@@ -44,7 +44,7 @@ while (@ARGV) {
last;
}
}
-die("Usage: bs_serverstatus [--top] <statusfile>\n") unless $ARGV[0];
+die("Usage: obs_serverstatus [--top] <statusfile>\n") unless $ARGV[0];
$| = 1;
print "\033[H\033[J" if $top;
my $nl = "\n";
--
1.8.3.1

View File

@ -6,12 +6,15 @@
Name: obs-server
Version: 2.10.1
Release: lp151.23.4
Release: lp151.23.5
Summary: The Open Build Service -- Server Component
License: GPL-2.0-only OR GPL-3.0-only
URL: http://www.openbuildservice.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: open-build-service-%version.tar.xz
Patch1: 0001-obs_server-fix-usage-info.patch
BuildArch: noarch
BuildRequires: python-devel, /usr/bin/xmllint, openssl, perl-BSSolv >= 0.36, perl-Compress-Zlib, xz
@ -477,6 +480,9 @@ usermod -a -G docker obsservicerun
%{_sbindir}/rcobsstoragesetup
%changelog
* Fri Sep 18 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 2.10.1-lp151.23.5
- correct usage info when exec 'obs_serverstatus' without other pargs
* Fri Sep 18 2020 lingsheng <lingsheng@huawei.com> - 2.10.1-lp151.23.4
- Add missing macros