Skip to content

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

Closed
wowi42 wants to merge 2 commits intopyinfra-dev:3.xfrom
KalvadTech:improve_apt
Closed

[WIP] refactor: enhance DebPackages and DebPackage facts to include detailed package information#1337
wowi42 wants to merge 2 commits intopyinfra-dev:3.xfrom
KalvadTech:improve_apt

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.
@KalvadTech KalvadTech closed this by deleting the head repository Sep 3, 2025
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.

3 participants