LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 956|回复: 6

深入理解 emerge 的 --deep 和 --with-bdeps 选项

[复制链接]
发表于 2008-10-30 23:32:33 | 显示全部楼层 |阅读模式
man emerge
line 208
       --deep (-D)
              This flag forces emerge to consider the entire  dependency  tree
              of packages, instead of checking only the immediate dependencies
              of the  packages. As  an  example,  this  catches  updates  in
              libraries  that are not directly listed in the dependencies of a
              package.  Also see --with-bdeps for  behavior  with  respect  to
              build time dependencies that are not strictly required.
        (深入 -D )
            这个标记强制 emerge 考虑软件包的完整依赖树,以代替只检查软件包的直接依赖。
            ……
       --with-bdeps < y | n >
              In dependency calculations, pull in build time dependencies that
              are not strictly required. This defaults to 'n' for installation
              actions, meaning they will not be installed,  and  'y'  for  the
              --depclean  action, meaning they will not be removed.  This set-
              ting can be added to EMERGE_DEFAULT_OPTS (see make.conf(5))  and
              later overridden via the command line.
            ……
            对于安装作业,它默认为“ n ”,意味着它们不会被安装,
            对于 --depclean 作业,意味着他们不会被移除。
            这个设置可以添加到 EMERGE_DEFAULT_OPTS (见 make.conf(5) ),……
` This flag forces emerge to consider the entire  dependency  tree of packages, instead of checking only the immediate dependencies of the  packages.`
我的理解为“这个标记强制 emerge 考虑软件包的完整依赖树,以代替只检查软件包的直接依赖。”

比方说,假设 A 依赖于 B1 B2,B1 依赖 C1,B2 依赖 C2,安装 A 时,有 -D , 则 emerge 不但检查 A 的依赖,还会检查 Bx 的依赖,甚至是 Cx 的依赖,
没有 -D ,则只检查 A 的依赖?
`For a dependency aware version of --unmerge, use --depclean or --prune.`
`Also see --with-bdeps for  behavior  with  respect  to build time dependencies that are not strictly required.`
这两句实在无法理解……


为什么不直接查看 emerge 源码查找答案呢?
1、我对 python 和 bash 一窍不通,一时半会看不慬,也不会去学习 python 和 bash 再来解决这个问题
2、即使已经掌握 python 和 bash 的基础,估计 portage 体系一时半会搞不慬


我很想写个小程序,自动配置 locale,自动安装中文字体和输入法,自动安装 中文 portage / emerge man,快快重排
《编译 2.6.27 内核 for thinkpad R60 + 最新 intel 集成显示驱动 x11-drivers/xf86-video-intel 支持》

可是,我还嫩,所以请各位前辈多多指点,谢谢。
发表于 2008-10-31 10:17:32 | 显示全部楼层
你对-D的理解是对的

后面两句考你的是阅读理解
你可以拿去问你的英文老师
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-2 11:05:29 | 显示全部楼层
你可以拿去问你的英文老师

这个……
张东苏先生认为译书必先具备三事:
一日文字之知识
二日学理之知识
三日须能循著者之思路

我的老师估计有一,二三嘛,明天上课时问一下吧。

我所在的学校(非本科)的那些所谓老师,哎,会计算机的,英语不咋滴,英语很行的,计算机却又不咋滴。
即使是两者都慬,也不一定明白 gentoo && portage。
回复 支持 反对

使用道具 举报

发表于 2008-11-3 00:07:51 | 显示全部楼层
`For a dependency aware version of --unmerge, use --depclean or --prune.`

这是说,--depclean 和 --prune 都属于一种卸载软件的命令,不过和--unmerge不检查任何依赖关系只卸载指定的软件不同,这两个是要检查依赖关系才能确定最后要卸载那些软件的


`Also see --with-bdeps for behavior with respect to build time dependencies that are not strictly required.`

另外请看--with-bdeps的解释,以了解有关并不是一定需要的构建时依赖关系(即构建工具,比如m4/autoconf/automake/libtool/gcc/binutils)的行为

这个翻译尚有提高余地,为了节省时间,先这样了,你明白就好
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-5 11:49:19 | 显示全部楼层
非常谢谢

多问一句,那么多人 经常用 --deep ,都明白它的作用了么? 还是觉得没有必要知道明白?
回复 支持 反对

使用道具 举报

发表于 2008-11-6 20:32:54 | 显示全部楼层
沉的太快了。不然我就不会出事了。

--with-bdeps 选项这个东西对于我这样的完美主义者实在太重要了,我可不想用着 KDE 4.1 美着,用者旧 cmake 恶心……

谢谢楼主的推荐。

关于 --deep,这个个人以为很容易理解。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-7 00:44:39 | 显示全部楼层
我啥时候推荐了……
回复 支持 反对

使用道具 举报

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

本版积分规则

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