package tools misbehaving

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

package tools misbehaving

Edd Barrett
Hi,

pkg_add appears to be exiting straight away without installing anything.

---8<---
# pkg_info
# echo $PKG_PATH
ftp://ftp.rt.fm/pub/OpenBSD/snapshots/packages/i386/
# pkg_add -i rxvt jwm zsh xpdf vim mplayer pidgin silc irssi feh
Ambiguous: choose package for vim
         0: <None>
         1: vim-7.1.175-gtk2
         2: vim-7.1.175-no_x11
Your choice: 1
Ambiguous: choose package for mplayer
         0: <None>
         1: mplayer-1.0pre8p17
         2: mplayer-1.0pre8p17-no_x11
         3: mplayer-1.0pre8p17-sdl
Your choice: 1
Ambiguous: choose package for pidgin
         0: <None>
         1: pidgin-2.3.1p0
         2: pidgin-2.3.1p0-gtkspell
Your choice: 1
Can't resolve silc
Ambiguous: choose package for irssi
         0: <None>
         1: irssi-0.8.12p1
         2: irssi-0.8.12p1-socks
Your choice: 1
#
---8<---

Is anyone else experiencing this?

--

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Pierre Riteau-3
On Feb 4, 2008 12:18 AM, Edd Barrett <[hidden email]> wrote:

> Hi,
>
> pkg_add appears to be exiting straight away without installing anything.
>
> ---8<---
> # pkg_info
> # echo $PKG_PATH
> ftp://ftp.rt.fm/pub/OpenBSD/snapshots/packages/i386/
> # pkg_add -i rxvt jwm zsh xpdf vim mplayer pidgin silc irssi feh
> Ambiguous: choose package for vim
>          0: <None>
>          1: vim-7.1.175-gtk2
>          2: vim-7.1.175-no_x11
> Your choice: 1
> Ambiguous: choose package for mplayer
>          0: <None>
>          1: mplayer-1.0pre8p17
>          2: mplayer-1.0pre8p17-no_x11
>          3: mplayer-1.0pre8p17-sdl
> Your choice: 1
> Ambiguous: choose package for pidgin
>          0: <None>
>          1: pidgin-2.3.1p0
>          2: pidgin-2.3.1p0-gtkspell
> Your choice: 1
> Can't resolve silc
> Ambiguous: choose package for irssi
>          0: <None>
>          1: irssi-0.8.12p1
>          2: irssi-0.8.12p1-socks
> Your choice: 1
> #
> ---8<---
>
> Is anyone else experiencing this?
>
> --
>
> Best Regards
>
> Edd
>
> http://students.dec.bournemouth.ac.uk/ebarrett
>
>

You should try with the -v option to get more details about what is going on.
-v       Turn on verbose output.  Several -v turn on more verbose output.

--
Pierre Riteau

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Edd Barrett
In reply to this post by Edd Barrett
On Feb 3, 2008 11:18 PM, Edd Barrett <[hidden email]> wrote:
> Can't resolve silc

Is is this causing the problem? Perhaps pkg_add should stop when it hits this?
--

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Ingo Schwarze
In reply to this post by Edd Barrett
Edd Barrett wrote on Sun, Feb 03, 2008 at 11:18:49PM +0000:
> pkg_add appears to be exiting straight away without installing anything.
>
> ---8<---
> # pkg_info
> # echo $PKG_PATH
> ftp://ftp.rt.fm/pub/OpenBSD/snapshots/packages/i386/
> # pkg_add -i rxvt jwm zsh xpdf vim mplayer pidgin silc irssi feh
[...]
> Can't resolve silc
[...]
> #

 $ ftp ftp.rt.fm
Connected to ftp.rt.fm.
[...]
ftp> cd pub/OpenBSD/snapshots/packages/i386
250 CWD command successful.
ftp> ls silc*
150 Opening ASCII mode data connection for '/bin/ls'.
-r--r--r--  1 1009  997   699548 Jan 31 09:22 silc-client-1.1.3.tgz
-r--r--r--  1 1009  997   328944 Jan 31 09:22 silc-server-1.0.4p0.tgz
-r--r--r--  1 1009  997  5956666 Jan 31 09:22 silc-toolkit-1.1.5.tgz

> ---8<---
> Is anyone else experiencing this?

When you request a non-existant package,
printing an error message and exiting is OK imho.

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Edd Barrett
On Feb 4, 2008 12:03 AM, Ingo Schwarze <[hidden email]> wrote:
> When you request a non-existant package,
> printing an error message and exiting is OK imho.
>

Agree, but it did not exit directly after the error, it continued to query me.



--

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Ingo Schwarze
Edd Barrett wrote on Mon, Feb 04, 2008 at 12:24:22AM +0000:
> On Feb 4, 2008 12:03 AM, Ingo Schwarze <[hidden email]> wrote:
>> When you request a non-existant package,
>> printing an error message and exiting is OK imho.
>
> Agree, but it did not exit directly after the error,
> it continued to query me.

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.  :)

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Toni Mueller-10
In reply to this post by Ingo Schwarze
Hi,

On Mon, 04.02.2008 at 01:03:13 +0100, Ingo Schwarze <[hidden email]> wrote:
> When you request a non-existant package,
> printing an error message and exiting is OK imho.

it would be better to not be offered non-existing files, wouldn't it?

I mean, in interactive mode, pkg_add has control about what to offer to
you...


Kind regards,
--Toni++

Reply | Threaded
Open this post in threaded view
|

Re: package tools misbehaving

Ingo Schwarze
Hi Toni,

Toni Mueller wrote on Tue, Apr 29, 2008 at 05:56:14PM +0200:
> On Mon, 04.02.2008 at 01:03:13 +0100, Ingo Schwarze <[hidden email]> wrote:

>> When you request a non-existant package,
>> printing an error message and exiting is OK imho.
>
> it would be better to not be offered non-existing files, wouldn't it?

Indeed, and pkg_add does not offer non-existant files.
That's not what happened.
Edd specified the non-existant package "silc" on the command line:

Citing from the rather old original posting
http://marc.info/?l=openbsd-misc&m=120208241503570&w=2 :

> # pkg_add -i rxvt jwm zsh xpdf vim mplayer pidgin silc irssi feh
> [...]
> Can't resolve silc
> [...]

Yours,
  Ingo