From: espie Date: Tue, 16 May 2023 16:45:04 +0000 (+0000) Subject: clean visible interface a bit: Ustar does not use errsay (but ArcCheck does) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2b8f9ab2494144ab844a8e36d0530b63bc508743;p=openbsd clean visible interface a bit: Ustar does not use errsay (but ArcCheck does) and having a forwarder for system for ONE use is a bit much ! --- diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm index b4195cd3ca8..d267af66af2 100644 --- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm +++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ArcCheck.pm,v 1.38 2023/05/16 14:33:04 espie Exp $ +# $OpenBSD: ArcCheck.pm,v 1.39 2023/05/16 16:45:04 espie Exp $ # # Copyright (c) 2005-2006 Marc Espie # @@ -53,6 +53,12 @@ sub check_linkname return $c eq $linkname; } +sub errsay +{ + my ($self, @args) = @_; + $self->{archive}{state}->errsay(@args); +} + sub validate_meta { my ($o, $item) = @_; diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm index 38735744561..253c2b3ddb6 100644 --- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm +++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Ustar.pm,v 1.92 2023/05/16 14:30:12 espie Exp $ +# $OpenBSD: Ustar.pm,v 1.93 2023/05/16 16:45:04 espie Exp $ # # Copyright (c) 2002-2014 Marc Espie # @@ -515,17 +515,6 @@ sub fatal $self->{archive}->fatal(@args); } -sub system -{ - my ($self, @args) = @_; - $self->{archive}{state}->system(@args); -} - -sub errsay -{ - my ($self, @args) = @_; - $self->{archive}{state}->errsay(@args); -} sub left_todo { my ($self, $toread) = @_; @@ -737,7 +726,7 @@ sub create { my $self = shift; $self->make_basedir; - $self->system(OpenBSD::Paths->mknod, + $self->{archive}{state}->system(OpenBSD::Paths->mknod, '-m', $self->{mode}, '--', $self->fullname, $self->devicetype, $self->{major}, $self->{minor}); $self->set_modes;