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

fix arch not recognizing optional dependencies #39

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

InnocentZero
Copy link
Collaborator

This fixes a bug where

Arch = [
	{ package = "pipewire", optional_deps = [
		"pipewire-alsa",
		"pipewire-jack",
		"pipewire-pulse",
		"wireplumber",         
		"libpulse",            
		"gst-plugin-pipewire",
	] },
]

does not recognize any of the optional dependencies.

@InnocentZero InnocentZero requested a review from ripytide November 1, 2024 11:38
@ripytide
Copy link
Owner

ripytide commented Nov 1, 2024

Why not use the existing map_managed_packages() function for this logic since these optional dependencies are a lot like groups in that they get expanded?

@InnocentZero
Copy link
Collaborator Author

I'm not entirely sure on how that function works and what it does, and more importantly, when I tried changing the signature to fit the requirements it basically became a giant mess. This seems simpler, but of course it could just be me misunderstanding what the function is doing once again.

@ripytide
Copy link
Owner

ripytide commented Nov 1, 2024

The function was needed since arch has two types of groups, meta-packages and just groups https://wiki.archlinux.org/title/Meta_package_and_package_group

So once you've installed a group it is as if you just installed a bunch of individual packages so then the pacdef clean would try and remove them all since it was not expecting them hence the need for us to expand the package groups before doing the checks for pacdef clean.

The signature for the function should not need to change, we take in the list of packages with groups un-expanded and output the expanded list. So we can expand out these dependencies at the same time.

@InnocentZero
Copy link
Collaborator Author

I figured it out. Thanks.

Signed-off-by: innocentzero <[email protected]>
Copy link
Owner

@ripytide ripytide left a comment

Choose a reason for hiding this comment

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

Looks Good 👍

@ripytide ripytide merged commit 2c11bab into ripytide:main Nov 1, 2024
5 checks passed
@InnocentZero InnocentZero deleted the arch_deps branch November 2, 2024 11:46
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