Re: package tools misbehaving

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Edd Barrett <vext01@...>
Cc: <misc@...>
Date: Monday, February 4, 2008 - 4:51 pm

Edd Barrett wrote on Mon, Feb 04, 2008 at 12:24:22AM +0000:

It looks like this is done on purpose,
see /usr/src/usr.sbin/pkg_add/pkg_add:

my $bad = 0;
[...]
[ inside some loop ]
my $result = OpenBSD::Interactive::choose1(
$pkgname, $state->{interactive}, sort @l);
if (defined $result) { [...] } else { $bad = 1; }
[...]
if ($bad) { exit(1); }

The error message is printed in OpenBSD::Interactive::choose1.

Thus, the design of pkg_add apparently is:
"In interactive mode, first figure out everything you can.
In case some question still remains unsolved at the end,
bail out just before you would otherwise start the real work."

This might even be useful.
When you see the fatal message, decide yourself
either to interrupt (in order to save time)
or to continue (in order to see all the questions).

--
my $bad = 0; # Marc Espie in /usr/src/usr.sbin/pkg_add/pkg_add
# This ^^^^^ is bold, but not too far from truth. :)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
package tools misbehaving, Edd Barrett, (Sun Feb 3, 7:18 pm)
Re: package tools misbehaving, Ingo Schwarze, (Sun Feb 3, 8:03 pm)
Re: package tools misbehaving, Toni Mueller, (Tue Apr 29, 11:56 am)
Re: package tools misbehaving, Ingo Schwarze, (Sat May 3, 4:06 pm)
Re: package tools misbehaving, Edd Barrett, (Sun Feb 3, 8:24 pm)
Re: package tools misbehaving, Ingo Schwarze, (Mon Feb 4, 4:51 pm)
Re: package tools misbehaving, Pierre Riteau, (Sun Feb 3, 7:37 pm)
Re: package tools misbehaving, Edd Barrett, (Sun Feb 3, 7:38 pm)