From: espie Date: Tue, 1 Nov 2022 17:25:33 +0000 (+0000) Subject: fix a logic error from 2018: be silent if any of -S, -n, -q are mentioned. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=50ab629c12caa194fba38dacc9895e653e64756e;p=openbsd fix a logic error from 2018: be silent if any of -S, -n, -q are mentioned. The actual bug reverted in 1.128 was from "make print-plist-libs" which would invoke pkg_create -n -Q and filter out the libs: but in that case, pkg_create would not be silent, thus yielding reading plist|-/usr/local/lib/libpython3.9.so.0.0 to filter, which obviously wouldn't work. So, turn on silent mode for -Q as well. --- diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 592a19b4360..b85eccaba96 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.182 2022/06/28 09:01:45 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.183 2022/11/01 17:25:33 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -127,8 +127,9 @@ sub handle_options } $state->{base} = $base; - $state->{silent} = defined $state->opt('n') && defined $state->opt('n') - || defined $state->opt('S'); + # switch to silent mode for *any* introspection option + $state->{silent} = defined $state->opt('n') || defined $state->opt('q') + || defined $state->opt('Q') || defined $state->opt('S'); if (defined $state->opt('u')) { $state->{userlist} = $state->parse_userdb($state->opt('u')); }