portcheck: fix COMMENT check in the no MULTI_PACKAGE case

if MULTI_PACKAGE isn't set $subpkg is "-" and it breaks the check for
COMMENT.  Trim out the - with ${subpkg%-} as already done in other parts
of portcheck.

ok tb@, sthen@
This commit is contained in:
op 2022-11-23 17:51:47 +00:00
parent ef04f4152f
commit 1b2ff04b83

View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: portcheck,v 1.142 2022/03/04 20:27:05 naddy Exp $
# $OpenBSD: portcheck,v 1.143 2022/11/23 17:51:47 op Exp $
# Copyright (c) 2013 Vadim Zhukov
#
# Permission to use, copy, modify, and distribute this software for any
@ -855,7 +855,7 @@ sub_checks() {
export SUBPACKAGE="$subpkg" FLAVOR="$flavor"
local wantlib_var=WANTLIB${subpkg%-}
local vars="COMMENT$subpkg FULLPKGNAME$subpkg"
local vars="COMMENT${subpkg%-} FULLPKGNAME${subpkg%-}"
vars="$vars MODULES"
vars="$vars PKG_ARCH$subpkg $wantlib_var WANTLIB-"
vars="$vars PERMIT_PACKAGE${subpkg%-}"