new method: reinitialize, for repositories with a sequential connection
authorespie <espie@openbsd.org>
Tue, 7 Jan 2014 01:29:17 +0000 (01:29 +0000)
committerespie <espie@openbsd.org>
Tue, 7 Jan 2014 01:29:17 +0000 (01:29 +0000)
that need a new connection if they're ever called from separate processes
simultaneously

usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm
usr.sbin/pkg_add/OpenBSD/PackageRepository/Persistant.pm

index 517df52..2befe3b 100644 (file)
@@ -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 <espie@openbsd.org>
 #
@@ -141,6 +141,10 @@ sub locations_list
        return $self->{locations};
 }
 
+sub reinitialize
+{
+}
+
 package OpenBSD::PackageRepository::Installed;
 
 our @ISA = (qw(OpenBSD::PackageRepositoryBase));
index af3df4a..7c52f81 100644 (file)
@@ -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 <espie@openbsd.org>
 #
@@ -134,4 +134,10 @@ sub cleanup
        }
 }
 
+sub reinitialize
+{
+       my $self = shift;
+       $self->initiate;
+}
+
 1;