Subject: bin/36941: pkg_add fails to pick newest package version
To: None <,>
From: Andreas Gustafsson <>
List: netbsd-bugs
Date: 09/07/2007 07:50:00
>Number:         36941
>Category:       bin
>Synopsis:       pkg_add fails to pick newest package version
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 07 07:50:00 +0000 2007
>Originator:     Andreas Gustafsson
>Release:        NetBSD 4.99.26
System: NetBSD 4.99.26 NetBSD 4.99.26 (GUAM) #0: Wed Aug 22 17:56:11 EEST 2007 i386
Architecture: i386
Machine: i386

I just tried to upgrade the Opera web browser from a binary package
using the command

  pkg_add -v -u -u opera

with PKG_PATH pointing at a private repository of -current binary
packages accessed over HTTP.  Even though the pkg_add man page says
that "If you omit the version number, pkg_add will install the latest
version available", pkg_add picked the obsolete version 9.0:

   # pkg_add -v -u -u opera
   increasing RLIMIT_NOFILE to max. 256 open files
   trying PKG_PATH
   pkg_add: nothing appropriate found
   pkg_add: nothing appropriate found
   pkg_add: nothing appropriate found
   best match: ''
   '[0-9]*.t[bg]z' expanded to ''
   Trying to fetch
   best match: ''

When I explicity specified the version number with

  pkg_add -v -u -u opera-9.23

pkg_add did the right thing and installed version 9.23.

This is using pkg_add version 20070802:

  # pkg_add -V

Here is a listing of the complete set of Opera packages pkg_add had to
choose from:

  -rw-r--r--  2 root  wheel  7179147 Jul 25  2006 opera-9.0.tgz
  -rw-r--r--  1 root  wheel  7181818 Sep 21  2006 opera-9.01.tgz
  -rw-r--r--  1 root  wheel  7257487 Dec  9  2006 opera-9.02.tgz
  -rw-r--r--  1 root  wheel  7211082 Mar  2  2007 opera-9.10.tgz
  -rw-r--r--  1 root  wheel  7296097 Apr 22 02:45 opera-9.20.tgz
  -rw-r--r--  1 root  wheel  7296291 Jul 14 23:30 opera-9.21.tgz
  -rw-r--r--  1 root  wheel  7300907 Jul 31 11:44 opera-9.22.tgz
  -rw-r--r--  1 root  wheel  7301442 Aug 24 23:47 opera-9.22nb1.tgz
  -rw-r--r--  1 root  wheel  7301058 Aug 31 05:12 opera-9.23.tgz


Should be fairly obvious from the above.