From 5d26b402c236a87cf3225edea3f1b4da7ad08ff6 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 3 Jan 2014 13:26:24 +0000 Subject: [PATCH] make sure elements are not set manually, namely forbid @depend (use -P) @wantlib (use -W) @name (duh) @arch @localbase @option manual-installation @comment pkgpath=... (some of this is actually redundant, but will give more explicit error messages) --- usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 27655fc98ee..8b4674c9e14 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.80 2014/01/02 20:13:43 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.81 2014/01/03 13:26:24 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -463,6 +463,8 @@ sub copy_over $e->write; } +sub forbidden() { 1 } + # override for CONTENTS: we cannot checksum this. package OpenBSD::PackingElement::FCONTENTS; sub makesum_plist @@ -635,6 +637,8 @@ sub avert_duplicates_and_other_checks $self->SUPER::avert_duplicates_and_other_checks($state); } +sub forbidden() { 1 } + package OpenBSD::PackingElement::Conflict; sub avert_duplicates_and_other_checks { @@ -683,6 +687,8 @@ sub avert_duplicates_and_other_checks $self->SUPER::avert_duplicates_and_other_checks($state); } +sub forbidden() { 1 } + package OpenBSD::PackingElement::NoDefaultConflict; sub avert_duplicates_and_other_checks { @@ -716,9 +722,21 @@ sub find_every_library package OpenBSD::PackingElement::DigitalSignature; sub is_forbidden() { 1 } +package OpenBSD::PackingElement::ExtraInfo; +sub is_forbidden() { 1 } + +package OpenBSD::PackingElement::ManualInstallation; +sub is_forbidden() { 1 } + package OpenBSD::PackingElement::Url; sub is_forbidden() { 1 } +package OpenBSD::PackingElement::Arch; +sub is_forbidden() { 1 } + +package OpenBSD::PackingElement::LocalBase; +sub is_forbidden() { 1 } + package OpenBSD::PackingElement::Fragment; our @ISA=qw(OpenBSD::PackingElement); -- 2.20.1