From d4b55ba364706acb7e0168611a4f550cfbb7627c Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 7 Jan 2014 01:29:17 +0000 Subject: [PATCH] new method: reinitialize, for repositories with a sequential connection that need a new connection if they're ever called from separate processes simultaneously --- usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm | 6 +++++- usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm index 517df5209a6..2befe3b6c05 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Installed.pm,v 1.26 2010/07/02 11:17:46 espie Exp $ +# $OpenBSD: Installed.pm,v 1.27 2014/01/07 01:29:17 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie # @@ -141,6 +141,10 @@ sub locations_list return $self->{locations}; } +sub reinitialize +{ +} + package OpenBSD::PackageRepository::Installed; our @ISA = (qw(OpenBSD::PackageRepositoryBase)); diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm index af3df4a50b0..7c52f8159c0 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Persistant.pm,v 1.1 2011/07/06 13:05:52 espie Exp $ +# $OpenBSD: Persistant.pm,v 1.2 2014/01/07 01:29:17 espie Exp $ # # Copyright (c) 2003-2011 Marc Espie # @@ -134,4 +134,10 @@ sub cleanup } } +sub reinitialize +{ + my $self = shift; + $self->initiate; +} + 1; -- 2.20.1