Subject: ftp and pkg_add
To: None <tech-pkg@netbsd.org>
From: Justin C. Sherrill <justin@shiningsilence.com>
List: tech-pkg
Date: 11/15/2007 13:28:16
I noticed while messing with pkg_add that when PKG_PATH is set to a FTP
URL, it uses /usr/pkg/bin/ftp to issue commands like this: (pkg_adding
minami as an example)

ftp> nlist minami /var/tmp/pkg.8YioXX
pkg_add: nothing appropriate found

ftp> nlist minami.tbz /var/tmp/pkg.nJ1Jqh
pkg_add: nothing appropriate found

ftp> nlist minami.tgz /var/tmp/pkg.1Tg8rM
pkg_add: nothing appropriate found

ftp> nlist minami-*.t[bg]z /var/tmp/pkg.516ivq
pkg_add: nothing appropriate found

Note that 'minami.tgz' and 'minami.tbz' are separated, but asking for
'minami-*' is included with the [] range.

There are FTP servers (just encountered one) that understands * as a glob,
but not the regular expression syntax of [a-z].

Here's my question(s):

- Is there any reason not to separate out that last statement when pkg_add
is calling FTP so that it does a separate NLIST for 'package-*.tgz' and
'package-*.tbz'?

- Is this something that should go in a send-pr?