From d4b7c1874f45249a61fc04a27b50b4d320140b89 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 20 Sep 2004 10:36:40 +0000 Subject: error out for pkgcfl in pkg_create, but don't warn if it's found in existing packages or installed packages. Too much noise for now. --- usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 9 ++++++++- usr.sbin/pkg_add/OpenBSD/PackingOld.pm | 9 +-------- usr.sbin/pkg_add/pkg_add | 3 +-- usr.sbin/pkg_add/pkg_create | 6 +++++- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index ab97a3e5337..268a09d8363 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.27 2004/09/20 08:53:53 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.28 2004/09/20 10:36:39 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -582,6 +582,13 @@ __PACKAGE__->setKeyword('pkgdep'); sub keyword() { "pkgdep" } sub category() { "pkgdep" } +package OpenBSD::PackingElement::PkgConflict; +our @ISA=qw(OpenBSD::PackingElement); + +__PACKAGE__->setKeyword('pkgcfl'); +sub keyword() { "pkgcfl" } +sub category() { "pkgcfl" } + package OpenBSD::PackingElement::Conflict; our @ISA=qw(OpenBSD::PackingElement); diff --git a/usr.sbin/pkg_add/OpenBSD/PackingOld.pm b/usr.sbin/pkg_add/OpenBSD/PackingOld.pm index 37e5049fb39..74a7d3408c4 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingOld.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingOld.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingOld.pm,v 1.3 2004/09/20 08:53:53 espie Exp $ +# $OpenBSD: PackingOld.pm,v 1.4 2004/09/20 10:36:39 espie Exp $ # # Copyright (c) 2004 Marc Espie # @@ -26,11 +26,4 @@ __PACKAGE__->setOldKeyword('src'); sub keyword() { 'src' } -package OpenBSD::PackingElement::PkgConflict; -our @ISA=qw(OpenBSD::PackingElement); - -__PACKAGE__->setOldKeyword('pkgcfl'); -sub keyword() { "pkgcfl" } -sub category() { "pkgcfl" } - 1; diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 98929b7c94a..41aab657a83 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.58 2004/09/20 09:10:21 espie Exp $ +# $OpenBSD: pkg_add,v 1.59 2004/09/20 10:36:39 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -21,7 +21,6 @@ use strict; use warnings; use OpenBSD::PackingList; -use OpenBSD::PackingOld; use OpenBSD::PackageInfo; use OpenBSD::PackageLocator; use OpenBSD::PackageName; diff --git a/usr.sbin/pkg_add/pkg_create b/usr.sbin/pkg_add/pkg_create index 5c6f440dc4e..5b24765deef 100644 --- a/usr.sbin/pkg_add/pkg_create +++ b/usr.sbin/pkg_add/pkg_create @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_create,v 1.18 2004/09/17 08:49:17 espie Exp $ +# $OpenBSD: pkg_create,v 1.19 2004/09/20 10:36:39 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie # @@ -375,6 +375,10 @@ if (defined $opt_B) { $plist->makesum($base); $plist->avert_duplicates(); +if (defined $plist->{pkgcfl}) { + print STDERR "Error: \@pkgcfl is obsolete, use \@conflict instead\n"; + $errors++; +} if ($errors) { exit(1); } -- cgit v1.2.3