pkg_mgr, a tool to manage and browse packages

2009-05-13 13:27:21来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


Landry Breuil (landry@) sent us a note about his new project and the impact it may have for your everyday ports usage.
After using OpenBSD for a few years, I was still missing a higher-level tool to manage installed packages and browse available ones, but I didn't really like
pbrowser
, it was too tied to a graphical toolkit. I first started to look at a tool written by a friend,
pkg_select
, but its C code was hard to understand, and it was aimed at pkgsrc.
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.

    Some kind of roadmap and ideas for the future :
  • if the ports-tree is available, permit to build packages, show port Makefile or packing-list
  • permit to customize PKG_PATH by selecting a mirror in
    ftp.html
    .
  • handle SIGWNCH
  • write a readline-based interface
  • differentiate between installed and selected packages
  • handle flavors/multipackages better
  • handle available updates (maybe tie it to update-notifier ?)
  • fix bugs (I'm sure there are plenty!)

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.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:关于/etc/passwd文件

下一篇:vi使用手册