Closed swsnr closed 2 years ago
My proposed fix just passes the lower
parameter to the ensure_packages operation.
I personally believe the better solution is to change the default value of lower
in ensure_packages should be False instead of True. However this is my opinion and probably requires a bigger discussion.
I personally believe the better solution is to change the default value of
lower
in ensure_packages should be False instead of True. However this is my opinion and probably requires a bigger discussion.
I'm inclined to agree here, although a lot of package managers are case insensitive so there's probably no true correct solution here. But from a code perspective it seems cleaner to default to False
and explicitly enable the lowercasing (https://github.com/Fizzadar/pyinfra/issues/772).
Thank you for the PR to fix this, will release in v1.7
later today!
Now released in v1.7
!
Thanks for the fix.
But why lowercase at all? If I'd want lowercased names I could just call .lower() explicitly? Why so much magic? Wouldn't it be cleaner to just take the given package names as is?
It dates back to 2015! https://github.com/Fizzadar/pyinfra/commit/ea437eeff89fac0274a4d709bee56e9606d31131
I think the idea was to normalise everything for case-insensitive package managers. I agree this is incorrect and that actually all package name lowercasing should be removed. Added https://github.com/Fizzadar/pyinfra/issues/779.
Describe the bug
With the following operation
pyinfra apparently attempts to install
mozillafirefox
, that is, the lowercase name:That's just plain wrong; zypper has case-sensitive package names, so it really needs to install
MozillaFirefox
, notmozillafirefox
.To Reproduce
Run the operation above against a Suse system.
Expected behavior
Install
MozillaFirefox
exactly as spelled in the operation.Meta
Include output of
pyinfra --support
.