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

Add pkginfo size output #130

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

mhrono
Copy link

@mhrono mhrono commented Aug 26, 2023

  • Adds call to os.path.getsize() to get installer_item_size in bytes
  • Adds output and description for installer_item_size

Adds additional keys from cataloginfo to processor output:
- installer_item_size: size of the source pkg sent to the processor
- installed_size: size of the pkg contents once installed, as reported by the pkg
remove erroneous additional newline
@mhrono mhrono marked this pull request as ready for review August 29, 2023 14:25
@mhrono
Copy link
Author

mhrono commented Aug 29, 2023

@grahampugh as discussed in Slack last week, I've made the necessary changes to add size outputs to this processor and tested them successfully. This should be ready to go!

not able to be fetched with some test recipes
@grahampugh
Copy link
Collaborator

Curious as to why you removed installed_size?

@mhrono
Copy link
Author

mhrono commented Aug 31, 2023

It was failing with a KeyError on a few test recipes and I couldn't figure out where it was having trouble getting the data. Happy to re-add it but I might need some guidance on troubleshooting the issue. The installer size has been working great.

@grahampugh
Copy link
Collaborator

To be clear, I don't require installed_size to be in there - I just wondered why the reason for removing. If it's not working and you don't need it, feel free to leave it out.

@mhrono
Copy link
Author

mhrono commented Sep 13, 2023

Yeah, I'm trying to get it working again mainly to learn what I'm missing. I'll likely be making a few more commits to this branch as I poke at it and will let you know if/when it's working and ready.

@mhrono
Copy link
Author

mhrono commented Sep 14, 2023

@grahampugh at long last, this is working and should be ready for review! I ended up breaking down each function and stepping through them to understand where the data was coming from and how it was flowing. Eventually I realized installerinfo was being checked for the installed size (which contains the output from getPkgRestartInfo) rather than receiptinfo, which actually contained the value.

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.

None yet

2 participants