diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-11-29 07:06:18 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-11-29 07:06:18 +0000 |
commit | 0ba21d3c14e00bce9b403948df1fbf54293f2d97 (patch) | |
tree | 14efaf7d692f17ae16f7826615c88b29f1dcb719 | |
parent | 2192b44da8e7e6ad37e7bbc20a3b5fb860984240 (diff) |
have SharedLibs use state to print error messages.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/SharedLibs.pm | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index 0e5757def45..a2d1d0b480b 100644 --- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Dependencies.pm,v 1.85 2009/11/28 10:25:34 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.86 2009/11/29 07:06:17 espie Exp $ # # Copyright (c) 2005-2007 Marc Espie <espie@openbsd.org> # @@ -477,8 +477,8 @@ sub solve_wantlibs $h->pkgname, ":"); } $okay = 0; - OpenBSD::SharedLibs::report_problem( - $state->{localbase}, $lib->{name}); + OpenBSD::SharedLibs::report_problem($state, + $lib->{name}); } } if (!$okay) { diff --git a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm index 837767b257c..7ce1832a1e7 100644 --- a/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm +++ b/usr.sbin/pkg_add/OpenBSD/SharedLibs.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SharedLibs.pm,v 1.38 2009/11/28 10:25:34 espie Exp $ +# $OpenBSD: SharedLibs.pm,v 1.39 2009/11/29 07:06:17 espie Exp $ # # Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org> # @@ -202,8 +202,9 @@ my $printed = {}; sub report_problem { - my $base = $_[0]; - my ($dir, $name) = normalize_dir_and_spec(@_); + my ($state, $p) = @_; + my $base = $state->{localbase}; + my ($dir, $name) = normalize_dir_and_spec($base, $p); my ($stem, $major, $minor) = parse_spec($name); return unless defined $stem; @@ -226,8 +227,8 @@ sub report_problem } if (!defined $printed->{$name} || $printed->{$name} ne $r) { $printed->{$name} = $r; - print "library $name not found\n"; - print $r; + $state->errsay("library $name not found"); + $state->print($r); } } |