免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1536 | 回复: 0
打印 上一主题 下一主题

pkg_mgr, a tool to manage and browse packages [复制链接]

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-16 18:02 |只看该作者 |倒序浏览

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.
e.g if you track -current, each time you update your ports-tree and packages, do something like this:  # pkg_add -ui -F installed sqlports
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)
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;
http://gruiik.info/pkg_mgr.html
.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_544920.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP