From: espie Date: Wed, 22 Nov 2023 11:18:37 +0000 (+0000) Subject: Prepare to do the updatedb stuff as an @option, so that the code is less ad-hoc X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=88b4d909edb50bcf7980a536923ed464352d067e;p=openbsd Prepare to do the updatedb stuff as an @option, so that the code is less ad-hoc --- diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 8e0481f65f7..6a3387efc39 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.289 2023/07/04 14:41:26 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.290 2023/11/22 11:18:37 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -828,6 +828,8 @@ sub new($class, $args) return OpenBSD::PackingElement::AlwaysUpdate->new_with_hash($1); } elsif ($args eq 'always-update') { return OpenBSD::PackingElement::AlwaysUpdate->new; + } elsif ($args eq 'updatedb') { + return OpenBSD::PackingElement::UpdateDB->new; } elsif ($args eq 'is-branch') { return OpenBSD::PackingElement::IsBranch->new; } else { @@ -867,6 +869,13 @@ package OpenBSD::PackingElement::Firmware; our @ISA=qw(OpenBSD::PackingElement::ManualInstallation); sub category($) { 'firmware' } +package OpenBSD::PackingElement::UpdateDB; +our @ISA=qw(OpenBSD::PackingElement::UniqueOption); +sub category($) +{ + 'updatedb'; +} + package OpenBSD::PackingElement::AlwaysUpdate; our @ISA=qw(OpenBSD::PackingElement::UniqueOption);