LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: bywind

有人给lfs增加软件包管理了吗?

[复制链接]
发表于 2005-9-19 17:46:46 | 显示全部楼层
仔细看了一下blfs, 欣喜地发现这段建议与我的做法一模一样:

------------------
Install in Separate Directories
This is a simplistic package management that does not need any extra package to manage the installations. Each package is installed in a separate directory. For example, package foo-1.1 is installed in /usr/pkg/foo-1.1 and a symlink is made from /usr/pkg/foo to /usr/pkg/foo-1.1. When installing a new version foo-1.2, it is installed in /usr/pkg/foo-1.2 and the previous symlink is replaced by a symlink to the new version.

The environment variables such as those mentioned in the section called “Going Beyond BLFS” need to be expanded to include /usr/pkg/foo. For more than a few packages, this scheme becomes unmanageable.
------------------

对于最后一句话我很失望(For more than a few packages, this scheme becomes unmanageable. ),但我发现blfs的这个脚本正是解决这个问题的:

  1. cat > /etc/profile.d/extrapaths.sh << "EOF"
  2. if [ -d /usr/local/lib/pkgconfig ] ; then
  3.         pathappend /usr/local/lib/pkgconfig PKG_CONFIG_PATH
  4. fi
  5. if [ -d /usr/local/bin ]; then
  6.         pathprepend /usr/local/bin
  7. fi
  8. if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
  9.         pathprepend /usr/local/sbin
  10. fi
  11. for directory in $(find /opt/*/lib/pkgconfig -type d 2>/dev/null); do
  12.         pathappend $directory PKG_CONFIG_PATH
  13. done
  14. for directory in $(find /opt/*/bin -type d 2>/dev/null); do
  15.         pathappend $directory
  16. done
  17. if [ -d ~/bin ]; then
  18.         pathprepend ~/bin
  19. fi
  20. #if [ $EUID -gt 99 ]; then
  21. #        pathappend .
  22. #fi
  23. EOF
复制代码


哈哈,blfs 里的那句话是 bug, 这种包管理方式一点问题没有
回复 支持 反对

使用道具 举报

发表于 2005-9-19 23:52:00 | 显示全部楼层
你们搞的太复杂了,还记得lndir吗?多方便呀!!!!!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表