diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-17 18:17:21 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-17 18:17:21 +0000 |
commit | 3d8234c961d6a82c057e15904bc47a856f543abf (patch) | |
tree | 7e3ef0774036b9432d4d6ce4d29755128db1d4dc /usr.sbin | |
parent | 2ced8c2fc0258c1651a0b2de3c8f0c18b9de4048 (diff) |
name each urlscheme
Diffstat (limited to 'usr.sbin')
4 files changed, 38 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index e661fe6835f..f4eec6f3895 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.33 2007/05/14 12:49:27 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.34 2007/05/17 18:17:20 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -206,6 +206,11 @@ sub cleanup package OpenBSD::PackageRepository::Local; our @ISA=qw(OpenBSD::PackageRepository); +sub urlscheme +{ + return 'file'; +} + sub open_pipe { my ($self, $object) = @_; @@ -252,6 +257,11 @@ sub list package OpenBSD::PackageRepository::Local::Pipe; our @ISA=qw(OpenBSD::PackageRepository::Local); +sub urlscheme +{ + return 'pipe'; +} + sub may_exist { return 1; @@ -570,6 +580,11 @@ sub parse_problems package OpenBSD::PackageRepository::HTTP; our @ISA=qw(OpenBSD::PackageRepository::HTTPorFTP); +sub urlscheme +{ + return 'http'; +} + sub list { my ($self) = @_; @@ -597,6 +612,10 @@ sub list package OpenBSD::PackageRepository::FTP; our @ISA=qw(OpenBSD::PackageRepository::HTTPorFTP); +sub urlscheme +{ + return 'ftp'; +} sub list { diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm index 4fc3705d362..cb9924ea895 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.5 2007/05/14 11:22:00 espie Exp $ +# $OpenBSD: Installed.pm,v 1.6 2007/05/17 18:17:20 espie Exp $ # # Copyright (c) 2007 Marc Espie <espie@openbsd.org> # @@ -41,6 +41,11 @@ package OpenBSD::PackageRepository::Installed; our @ISA = (qw(OpenBSD::PackageRepositoryBase)); +sub urlschem +{ + return 'inst'; +} + use OpenBSD::PackageInfo (qw(is_installed installed_info installed_packages installed_stems)); diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm index 20831ab5107..183b95c7287 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SCP.pm,v 1.10 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: SCP.pm,v 1.11 2007/05/17 18:17:20 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -24,6 +24,11 @@ our @ISA=qw(OpenBSD::PackageRepository::Distant); use IPC::Open2; use IO::Handle; +sub urlscheme +{ + return 'scp'; +} + our %distant = (); # Any SCP repository uses one single connection, reliant on a perl at end. diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Source.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Source.pm index e5dfd158c50..500d3b18126 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/Source.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/Source.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Source.pm,v 1.2 2007/04/15 10:17:29 espie Exp $ +# $OpenBSD: Source.pm,v 1.3 2007/05/17 18:17:20 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -20,6 +20,11 @@ use warnings; package PackageRepository::Source; +sub urlscheme +{ + return 'src'; +} + sub find { my ($repository, $name, $arch, $srcpath) = @_; |