From cbecba2f25105cdc2867805fc58090b471b3a7e3 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 4 Jul 2023 13:58:01 +0000 Subject: [PATCH] fix some very minor syntactic nits --- usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 4 ++-- usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 5dfaa3f496a..d9d4d29ae35 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.287 2023/06/13 09:07:17 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.288 2023/07/04 13:58:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -1950,7 +1950,7 @@ sub _iso8601_to_time($s) { if ($s =~ m/^(\d{4})\-(\d{2})\-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})Z$/) { my ($year, $month, $day, $hour, $min, $sec) = - ($1 - 1900, $2-1, $3, $4, $5, $6); + ($1 - 1900, $2-1, $3, $4, $5, $6); require POSIX; my $oldtz = $ENV{TZ}; $ENV{TZ} = 'UTC'; diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index dbcf5eb0b21..0765c51dbf5 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.192 2023/06/20 14:50:05 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.193 2023/07/04 13:58:01 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -591,7 +591,8 @@ sub makesum_plist($self, $state, $plist) my $fname = $self->fullname; for (my $i = 1; ; $i++) { if (-e "$state->{base}/$fname-$i") { - my $e = OpenBSD::PackingElement::File->add($plist, $self->name."-".$i); + my $e = OpenBSD::PackingElement::File->add($plist, + $self->name."-".$i); $e->compute_checksum($e, $state, $state->{base}); } else { last; @@ -701,7 +702,9 @@ sub avert_duplicates_and_other_checks($self, $state) } elsif ($self->spec->is_valid) { my @m = $self->spec->filter($self->{def}); if (@m == 0) { - $state->error("\@#1 #2\n pattern #3 doesn't match default #4\n", + $state->error( + "\@#1 #2\n". + " pattern #3 doesn't match default #4\n", $self->keyword, $self->stringize, $self->{pattern}, $self->{def}); } @@ -766,7 +769,9 @@ sub check_version($self, $state, $unsubst) my @l = $self->parse($self->name); if (defined $l[0]) { if (!$unsubst =~ m/\$\{LIB$l[0]_VERSION\}/) { - $state->error("Incorrectly versioned shared library: #1", $unsubst); + $state->error( + "Incorrectly versioned shared library: #1", + $unsubst); } } else { $state->error("Invalid shared library #1", $unsubst); -- 2.20.1