Landry Breuil (landry@) sent us a note about his new project and the impact it may have
for your everyday ports usage.
Then I remembered the existence of sqlports from Marc Espie (espie@)
and found out that no one was using it. And as pkg_* tools are written
in Perl (and I like Perl!), I decided to write my own curses-based tool
on top of sqlports with Perl.
I first tried to use one of the available ORM in the ports-tree (like
DBIx::Class and Rose::DB), but found out that it was too slow for the few
SQL queries I needed, so I ended writing my own plain DBD::SQLite model.
I decided to strongly separate the interface from the model backend, so
it would be easier to write an interface in something else that uses curses.
It quickly grew into something usable, and I rapidly added all the
essential features I needed, but I kept it simple (atm it's only 650
lines of Perl).
So here's for the story.. now pkg_mgr is a user-friendly graphical tool
which allows you to manage installed packages, browse available packages
by categories, and finally install/uninstall packages (using sudo, hence
you don't need to run it as root).
At the moment, only a simple curses interface is available, but a Gtk2
GUI is planned soon.
It is in no way intended to replace existing working tools, however it
uses them extensively. It is just a more high-level interface to them
(hence you'll need PKG_PATH set if you want to install packages). At the
moment, you don't need the ports-tree installed to use it, but for
future use it would be useful.
It relies on databases/sqlports for the internal database, so you will
need to have an up-to-date version installed for pkg_mgr to work well.
e.g if you track -current, each time you update your ports-tree and packages, do something like this:
It uses Curses::UI, you will need a recent version of it (-current or
4.3 are okay, 4.2 or older are not because Curses::UI with dialog
support is available only since a recent update. This limitation may
disappear in the future)
# pkg_add -ui -F installed sqlports
If you only want to test it, you can install dependencies (pkg_add
p5-Curses-UI p5-Curses p5-Term-ReadKey sqlports p5-DBD-SQLite), download
source, untar it, and run it directly from source with ./pkg_mgr. Or
just use the port which will be soon committed in sysutils.
I have lots of ideas for this new tool, but I need user feedback first,
so I'd be happy to have comments and rants about it.
More information (source and screenshots) are available here;