Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/rpmbuild/xmake.spec 会在构建包的时候自动加入一些不是必须的依赖 #6073

Closed
ShelpAm opened this issue Jan 13, 2025 · 4 comments · Fixed by #6074
Closed
Labels
Milestone

Comments

@ShelpAm
Copy link
Contributor

ShelpAm commented Jan 13, 2025

Xmake 版本

2.9.5

操作系统版本和架构

6.12.7-200.fc41.x86_64

描述问题

当我使用dnf enable waruqi/xmake && dnf install xmake -y的时候,报如下错误:

Failed to resolve the transaction:
Problem: cannot install the best candidate for the job

  • nothing provides /usr/bin/pwsh needed by xmake-2.9.7-4.fc41.x86_64 from copr:copr.fedorainfracloud.org:shelpam:xmake # 此处我克隆了一份copr库,和原库是一样的
    You can try to add to command line:
    --no-best to not limit the transaction to the best candidates
    --setopt=optional_metadata_types=filelists to load additional filelists metadata
    --skip-broken to skip uninstallable packages

可是/usr/bin/pwsh不是必须的依赖。

期待的结果

rpmbuild在构建包的时候,不要加入不必要的依赖,如/usr/bin/pwsh。

工程配置

附加信息和错误日志

然而,不需要关闭所有自动查询依赖的功能。

我仔细研究了一下pwsh依赖的来源,发现:

Mangling shebangs 导致 xmake/scripts/ 中各种脚本中的 #!/usr/bin/env xxx 被替换为 #!/usr/bin/xxx。如:在 xmake/scripts/unzip.ps1 中,第一行被替换为 #!/usr/bin/pwsh,而此处引入了 /usr/bin/pwsh 的依赖。

可能的修复方法

scripts/rpmbuild/xmake.spec 中,在第二行后插入一行 %undefine __brp_mangle_shebangs

@ShelpAm ShelpAm added the bug label Jan 13, 2025
@waruqi
Copy link
Member

waruqi commented Jan 13, 2025

可以提个 pr过来

@ShelpAm
Copy link
Contributor Author

ShelpAm commented Jan 13, 2025

好的~

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


You can submit a PR

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Okay~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants