From: espie Date: Sun, 8 Oct 2023 12:44:58 +0000 (+0000) Subject: oops, those eval need to be STRINGS, otherwise the whole definition stuff X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bb20767b782a2f891bbbde97920f2cc3573a99b2;p=openbsd oops, those eval need to be STRINGS, otherwise the whole definition stuff happens regardless. Add a third one to only disregard base libraries --- diff --git a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm index b0dfa0a3614..8c285eac710 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddCreateDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddCreateDelete.pm,v 1.54 2023/10/08 09:17:27 espie Exp $ +# $OpenBSD: AddCreateDelete.pm,v 1.55 2023/10/08 12:44:58 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -57,18 +57,28 @@ sub add_interactive_options($self) my $setup = { nowantlib => sub() { - eval { + eval ' use OpenBSD::Dependencies::SolverBase; no warnings qw(redefine); package OpenBSD::Dependencies::SolverBase; sub solve_wantlibs($, $) { 1 } - }; + '; + }, + nosystemwantlib => sub() { + eval ' + use OpenBSD::LibSpec; + package OpenBSD::Library::System; + sub no_match_dispatch($library, $spec, $base) + { + return $spec->no_match_name($library, $base); + } + '; }, norun => sub() { - eval { + eval ' package OpenBSD::State; sub _system(@) { 0 } - }; + '; }, };