diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-05-30 15:04:55 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-05-30 15:04:55 +0000 |
commit | ca9b099729a6c65b08b713a338bceefabb22868e (patch) | |
tree | 5a469835cb9e4f9bc9c9d17fbcd004668d9b4d2d /usr.sbin | |
parent | 9142731c385c29c460f9411062ccb8f8f22ed41c (diff) |
oops, auto-read config only *after* we have a way to print out errors.
Also zap bad lines completely.
issue reported by aja@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index 2839235ffca..5de4eaac48d 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddDelete.pm,v 1.62 2014/05/20 05:46:13 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.63 2014/05/30 15:04:54 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -214,8 +214,8 @@ sub init $self->{status} = OpenBSD::Status->new; $self->{recorder} = OpenBSD::SharedItemsRecorder->new; $self->{v} = 0; - $self->{wantntogo} = $self->config->istrue("ntogo"); $self->SUPER::init(@_); + $self->{wantntogo} = $self->config->istrue("ntogo"); $self->{export_level}++; } diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index cbca91a79d8..7bf339b5752 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.28 2014/05/20 05:43:55 espie Exp $ +# $OpenBSD: State.pm,v 1.29 2014/05/30 15:04:54 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org> # @@ -47,6 +47,7 @@ sub read_file # bad line: should we say so ? $state->errsay("Bad line in #1: #2 (#3)", $filename, $_, $.); + next; } # remove caps $k =~ tr/A-Z/a-z/; |