【发布时间】:2019-01-10 04:55:00
【问题描述】:
每次rpm 命令返回不同的退出代码。例如 - 如果依赖失败,有时 echo $? 会给出 1,有时会给出 5。有人可以解释一下吗?
【问题讨论】:
-
我在
man中找不到任何有关退出代码的信息 -
对,没提。虽然我发现了这个
Yes. Unfortunately, it's a very short list: the exit code equals the number of failed packages, capped at 255.redhat.com/archives/rpm-list/2005-July/msg00071.html,但不是很隐蔽 -
rpm 返回的所有错误都是一样的吗?假设有时错误是
failed dependency,有时是erase failed。这两个错误的退出代码是否等于失败包的数量?
标签: linux centos redhat rpm suse