Skip to content

Fix -B --noconfirm conflict check - #1536

Open
gyscos wants to merge 2 commits into
Morganamilo:masterfrom
gyscos:master
Open

Fix -B --noconfirm conflict check#1536
gyscos wants to merge 2 commits into
Morganamilo:masterfrom
gyscos:master

Conversation

@gyscos

@gyscos gyscos commented Apr 19, 2026

Copy link
Copy Markdown

As reported in #1376, trying to build a package that would conflict with any installed packages currently works interactively, but not with --noconfirm.

7799203 was trying to fix the problem, but the issue persists on the latest master.

To reproduce, an easy way is trying to build one of paru/paru-bin/paru-git (whichever is not currently installed on the system, or all 3).

Example if paru is already installed, trying to build paru-bin:

cargo run -- -G paru-bin && cargo run -- -B --noconfirm paru-bin

Currently on the latest master, this outputs:

:: Generating .SRCINFO for ./paru-bin...
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

:: Conflicts found:
    paru-bin: paru

:: Conflicting packages will have to be confirmed manually
error: can not install conflicting packages with --noconfirm

Another reproduction example: the eternalterminal package. It's a split package with 3 packages: a client, a server, and a package that includes both (unfortunately not a virtual package that depends on both the client and the server). Trying to build it produces internal conflicts with the current master branch, but works with this PR.

cargo run -- -G eternalterminal && cargo run -- -B --noconfirm eternalterminal

In this branch, this properly builds the package.

This now:

  • Properly accounts for all packages being built, not just the latest one (for split packages where we build multiple packages)
  • Apply the filter on inner conflicts as well, which is what was being triggered on no-confirm.

@pfeifferj

Copy link
Copy Markdown
Collaborator

testdata/clone/devel-bin/ is missing its .SRCINFO. Mock::new() walks every subdir of testdata/clone/ and does Srcinfo::from_path(dir.path().join(".SRCINFO"))? on startup, so with just a PKGBUILD it ENOENTs and every test panics before running. that's why ci is red

@gyscos

gyscos commented Apr 23, 2026

Copy link
Copy Markdown
Author

Aaah I see, was trying to figure out what I broke :)

Will fix that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants