On Wed, Jun 29, 2005 at 02:08:15PM -0700, Brian wrote: > I just read the interview at: > > http://mongers.org/openbsd/interview-espie-ports > > And one thing that jumped out at me was: > > "The perl modules are there so that someone could write some cool tools > directly." > > Now, I just started to learn PERL yesterday. And one thing I would love to be > able to do would be to glob the package I am pulling down. > > For example, I would love to just write: > > pkg_add -v ${PKG_PATH}/mozilla-firefox*.tgz > > Is this possible using the perl modules mentioned above?
Actually, it's more a question of making the locator code smarter. There's most of the code in OpenBSD::PackageLocator If you look closely, you'll see some list methods, which are precisely there to allow you to list what packages are at a given location. And there's a findstem() function in OpenBSD::PackageName which is there to allow something very similar to this kind of globbing. In fact, pkg_delete already uses it. The main reason it's not active yet is that some ftp mirrors do not allow simultaneous connections from a given IP, so we have to be careful not to have several connections active at the same time. ... which means having a better model of network locations. This is on my list of stuff to do. Actually, it's fairly high now that I've more or less completed pkg_merge.