rpm build error: invalid predicate


rpm build error

error message:
/usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS
find: invalid predicate `' error: Bad exit status from /var/tmp/rpm-tmp.86590 (%install)


The error appears to be caused by an empty RPM_BUILD_ROOT variable. Below is one offending line:

1 find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
2                  \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
3                  -print |


If RPM_BUILD_ROOT hasn't been defined, then the first argument to find is an empty string "", which causes this error. Interestingly enough, if you remove the quotes from around $RPM_BUILD_ROOT, then command works fine since the first argument would become the "!". Since it's not required to define a "BuildRoot:" in the spec file, this certainly looks like a bug to me.

Solutions:
1. Try defining the BuildRoot variable in the spec file.
The find-debuginfo script looks in to that directory several times, and will die without it.
This will usually look something like: BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}

2. %define debug_package %{nil}

references: http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece76310579135480ddd276b97844b22918448e435061e5a25a4ec66644b598f8461640baa4259ebf62b32755c37b7ed98cf1183ed852859df67742d5c92044f934fa08c0765d620e104b2ff0ee7cbb070ccb9d2a28b0f0f9c44040a97f0fd4d01649c38a05364f4a7e913490b4dadec4072ff2e6028ef621aa14788bb6e2a54dfad8b4b4cb268903647ccfe66f669&p=9a39de16d9c11be54bbd9b7d0c1c81&newp=9970c00497934eac59e7df2d021494231610db2151d4d11f34&user=baidu&fm=sc&query=/usr/lib/rpm/find-debuginfo.sh+invalid+predicate&qid=&p1=2


转载于:https://www.cnblogs.com/goooogs/p/3842724.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值