Prompt what package to install when it is missing

Jeremy Lavergne jeremy at lavergne.gotdns.org
Fri Nov 11 14:28:00 PST 2011


> Today, that's what we're after. Other days, we're after 

... so?



Command-Not-Found is a python package:
http://bazaar.launchpad.net/~zkrynicki/command-not-found/trunk/files/head:/CommandNotFound/

It can pull down a new list of files (scan data) in case you want it to be a separate step within sync/selfupdate:
http://bazaar.launchpad.net/~zkrynicki/command-not-found/trunk/view/head:/update-from-web.sh

The scan data looks to simply have a 4-tuple of data: architecture, component, package, binaries. We really only need the last two but could make use of architecture as well.

As Scott pointed out, we simply need to dump a list of programs into this scan data and we're pretty much set. Add in a clause to check that command-not-found is installed, and then bash can automatically scan the file list for packages that provide the missing binary.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 8796 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20111111/169e69b6/attachment.bin>


More information about the macports-users mailing list