LinuxSir.cn,穿越时空的Linuxsir!

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

rpmbuild修改编译选项后是否可以不用整个从头开始?

[复制链接]
发表于 2007-6-24 09:19:23 | 显示全部楼层 |阅读模式
发现仅仅只是在spec中添加一条编译选项后rpmbuild会整个重新来过。。。(rm旧的build目录,解包,configure,make。。。)这样很耗时间啊。
旧的build目录就在那里为什么一定要移除呢?就在旧的基础上开始不行么?


请问,如果以前build过一次的,可否不用rm掉旧的obj而在旧的基础上来构建呢?
发表于 2007-6-24 09:28:03 | 显示全部楼层
  1.   -bp                           build through %prep (unpack sources and apply
  2.                                 patches) from <specfile>
  3.   -bc                           build through %build (%prep, then compile)
  4.                                 from <specfile>
  5.   -bi                           build through %install (%prep, %build, then
  6.                                 install) from <specfile>
  7.   -bl                           verify %files section from <specfile>
  8.   -ba                           build source and binary packages from
  9.                                 <specfile>
  10.   -bb                           build binary package only from <specfile>
  11.   -bs                           build source package only from <specfile>
  12.   -tp                           build through %prep (unpack sources and apply
  13.                                 patches) from <tarball>
  14.   -tc                           build through %build (%prep, then compile)
  15.                                 from <tarball>
  16.   -ti                           build through %install (%prep, %build, then
  17.                                 install) from <tarball>
  18.   -ta                           build source and binary packages from <tarball>
  19.   -tb                           build binary package only from <tarball>
  20.   -ts                           build source package only from <tarball>
  21.   --rebuild                     build binary package from <source package>
  22.   --recompile                   build through %install (%prep, %build, then
  23.                                 install) from <source package>
  24.   --buildroot=DIRECTORY         override build root
  25.   --clean                       remove build tree when done
  26.   --nobuild                     do not execute any stages of the build
  27.   --nodeps                      do not verify build dependencies
  28.   --nodirtokens                 generate package header(s) compatible with
  29.                                 (legacy) rpm[23] packaging
  30.   --rmsource                    remove sources when done
  31.   --rmspec                      remove specfile when done
  32.   --short-circuit               skip straight to specified stage (only for c,i)
复制代码

注意 --short-circuit
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-24 14:23:26 | 显示全部楼层
了解,-bc --short-circuit 和 -bi --short-circuit 可以仅仅进行 %build 和 %install 的动作。

不过我最后还想产生 rpm 包,-bb 不能 --short-circuit 的么?还有其他方法产生 rpm 包么?
回复 支持 反对

使用道具 举报

发表于 2007-6-24 14:36:33 | 显示全部楼层
这些选项用于辅助spec编写,最终生成RPM仍然建议按照完整流程。 也可以避免问题的发生。
回复 支持 反对

使用道具 举报

发表于 2007-6-24 14:43:55 | 显示全部楼层
加上--short-circuit是为了测试用的,-bp/-bc/-bi一步步测试总好过从头来;
但是出成品时一定是完整的步骤。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-24 16:41:23 | 显示全部楼层
哦,多谢了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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