Skip to content

[WIP] refactor: enhance DebPackages and DebPackage facts to include detailed package information #1337

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

Draft
wants to merge 2 commits into
base: 3.x
Choose a base branch
from

Conversation

wowi42
Copy link
Contributor

@wowi42 wowi42 commented Apr 11, 2025

  • Updated the DebPackages class to return a structured dictionary for each package, including desired action, status, version, architecture, and description.
  • Modified the regex pattern to capture additional package details.
  • Adjusted related test cases to reflect the new data structure for package facts.

…d package information

- Updated the DebPackages class to return a structured dictionary for each package, including desired action, status, version, architecture, and description.
- Modified the regex pattern to capture additional package details.
- Adjusted related test cases to reflect the new data structure for package facts.
@wowi42 wowi42 marked this pull request as draft April 11, 2025 19:44
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

@wowi42 this is neat, way more info than before, but does introduce a breaking change (I believe it'll also break apt.packages).

It might be better off to expand the DebPackage fact rather than this one - is there a use-case in mind for getting all this info for all packages vs. individual packages?

vram0gh2 added a commit to vram0gh2/pyinfra that referenced this pull request Jun 1, 2025
Fixes pyinfra-dev#1337 which occurs due a type mismatch between the
local file mode returned by get_path_permissions_mode() in api/util.py (str),
and the mode data type from the remote file fact (int).

Make the change in api/util.py to return an int so the behavior both matches the
function's docstring and the implied semantics within put() in
operations/files.py.
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