Skip to content

fix(install): skip packages already satisfied by a provider - #190

Open
nuknes wants to merge 6 commits into
caelestia-dots:mainfrom
nuknes:fix(install)-skip-packages-already-satisfied-by-a-provider
Open

nuknes wants to merge 6 commits into
caelestia-dots:mainfrom
nuknes:fix(install)-skip-packages-already-satisfied-by-a-provider

Conversation

@nuknes

@nuknes nuknes commented Nov 5, 2026

Copy link
Copy Markdown

if we're running caelestia-shell-git or caelestia-cli-git instead of the stable tagged versions, caelestia install breaks because pacman hits a file conflict and prompts to remove/replace the -git package, or it just aborts if --noconfirm

this also blocks the supported way to toggle optional components (using --enable-components / --disable-components flags), or by running caelestia install again

ArchInstaller.install() passes all names to yay -S --needed but pacman's --needed checks the literal package name in the local db and not Provides, so e.g. we have caelestia-shell-git installed, as far as it' s concerned "caelestia-shell" isn't installed (not recognizing caelestia-shell-git), yay then builds it, and pacman conflicts

the installer class already has query() which uses pacman -Q (resolves Provides) but right now it's only called after the install step for name resolution, never before to skip

this PR fixes the issue by filtering the list before handing it to the AUR helper, the resolved line still iterates the full packages list so DotsState records the real installed name e.g. caelestia-shell-git, not caelestia-shell

@github-actions github-actions Bot added the fix A bug fix label Nov 5, 2026
Comment thread src/caelestia/utils/dots/packages.py Resolved
previous filter skipped all installed packages, preventing --needed from upgrading them.. now only packages satisfied by a different provider are excluded, preserving the upgrade path
@nuknes
nuknes requested a review from dxnnv November 6, 2026 13:53
Comment thread src/caelestia/utils/dots/packages.py Resolved
@nuknes
nuknes requested a review from dxnnv November 7, 2026 03:49
…kage

uses re.split to extract the base name for comparison, so versioned dependencies (e.g. "caelestia-shell>=2.5.0") are handled correctly

Co-authored-by: dxnnv <danny@atropos.cc>

@dxnnv dxnnv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues with correctness seem to be resolved, the only thing I can see now is an optimization benefit from batching.

Sorry for the third requested change 😅—would just commit this directly but wanted to propose it in case you had any feedback you wanted to share prior.

Comment thread src/caelestia/utils/dots/packages.py Resolved
@dxnnv dxnnv self-assigned this Nov 7, 2026
@nuknes
nuknes requested a review from dxnnv November 8, 2026 01:39
Co-authored-by: Danny Atropos <danny@atropos.cc>
@nuknes

nuknes commented Nov 8, 2026

Copy link
Copy Markdown
Author

all threads resolved, ready for re review when you get a chance

@soramanew

soramanew commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Sorry for dropping this after all the reviews and fixes, but with the CLI rewrite in progress, most prs (basically anything that has to do with the python code) aren't really relevant anymore since all python will be replaced.

I appreciate the effort though!

@dxnnv

dxnnv commented Nov 9, 2026

Copy link
Copy Markdown
Member

Sorry for dropping this after all the reviews and fixes, but with the CLI rewrite in progress, most prs (basically anything that has to do with the python code) aren't really relevant anymore since all python will be replaced.

I also figured this wouldn't be merged before the rewrite, but the concept is applicable for the CLI regardless of language, so it should still be incorporated in a revised version for C++. Mainly kept this and have been making changes to establish the logic flow, as that's the primary change here for the installation method itself.

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

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants