summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-09-20 10:36:40 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-09-20 10:36:40 +0000
commitd4b7c1874f45249a61fc04a27b50b4d320140b89 (patch)
tree8b89e805e4a07858944cc7df53325af9766f88ed
parent92683492f23722ce35cc61dbe4874eb848b77cbe (diff)
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.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm9
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingOld.pm9
-rw-r--r--usr.sbin/pkg_add/pkg_add3
-rw-r--r--usr.sbin/pkg_add/pkg_create6
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 <espie@openbsd.org>
#
@@ -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 <espie@openbsd.org>
#
@@ -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 <espie@openbsd.org>
#
@@ -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 <espie@openbsd.org>
#
@@ -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);
}