8月 152017
 

rpm打包之前会执行: /usr/lib/rpm/check-buildroot, 其逻辑为,检查将要打包的文件中是否包含buildroot,因为这只是build时候的临时目录,如果出现在打包文件中,就可能会出现问题,起检查方法简单粗暴:

如果包含,就会报类似如下的错误信息,然后退出

关于check-buildroot脚本:

其一:

通过mktemp来创建临时文件,根本不需要自己制造随机文件名

其二:

保证在脚本退出后删除临时文件

其三:

注意,这里 ” || : ” 的用法,保证test为假时脚本退出码为零

 Posted by at 下午 5:06

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据