summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-10-25 21:33:16 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-10-25 21:33:16 +0000
commit9755b727762a9ab3db2799a03c6d8e295efd7b6c (patch)
treec947399b3419ac93fd0a1f1acc303f9cc59cd453
parentecd6197fa815a9c0de627ec392c5c8813bdcbfc2 (diff)
@symlink/@size/@link are generated automatically, make pkg_create(1) error
out if we create them manually, instead of erroring later during pkg_add.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index edc5895849c..6938c0944b8 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.25 2010/10/25 18:00:10 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.26 2010/10/25 21:33:15 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -157,7 +157,12 @@ sub compute_checksum
if (defined $base) {
$fname = $base.$fname;
}
-
+ for my $field (qw(symlink link size)) { # md5
+ if (defined $result->{$field}) {
+ $state->error("User tried to define @#1 for #2",
+ $field, $fname);
+ }
+ }
if (-l $fname) {
if (!defined $base) {
$state->error("special file #1 can't be a symlink",