1 Star 0 Fork 107

yinchuang/openEuler-rpm-config_1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
find-requires 940 Bytes
一键复制 编辑 原始数据 按行查看 历史
Funda Wang 提交于 2024-08-25 18:44 +08:00 . merge two messy repositories
#!/bin/bash
#
# Auto-generate requirements for executables (both ELF and a.out) and library
# sonames, script interpreters, and perl modules.
#
ulimit -c 0
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
#
# --- Kernel module imported symbols
#
# Since we don't (yet) get passed the name of the package being built, we
# cheat a little here by looking first for a kernel, then for a kmod.
#
unset is_kmod
for f in $filelist; do
if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*)\.ko(\.gz|\.bz2|\.xz)?$:\2:p') ]
then
is_kmod=1;
elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
then
unset is_kmod;
break;
fi
done
[ -x /usr/lib/rpm/@VENDOR@/find-requires.ksyms ] && [ "$is_kmod" ] &&
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/@VENDOR@/find-requires.ksyms
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ychuawei/openEuler-rpm-config_1.git
git@gitee.com:ychuawei/openEuler-rpm-config_1.git
ychuawei
openEuler-rpm-config_1
openEuler-rpm-config_1
master

搜索帮助