From 2d7516c0ea90644fcdb98265450eb84db1070ce8 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 29 May 2017 12:54:05 +0000 Subject: [PATCH] do not whine if installpath is undef. --- usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index 2a4abb7d263..242fd414a8a 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.143 2017/05/18 12:24:15 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.144 2017/05/29 12:54:05 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -113,7 +113,10 @@ sub parse { my ($class, $r, $state) = @_; + { + no warnings qw(uninitialized); # in case installpath is empty $$r =~ s/^installpath(\:|$)/$state->installpath.$1/e; + } my $u = $$r; return undef if $u eq ''; -- 2.20.1