grahampugh-recipes icon indicating copy to clipboard operation
grahampugh-recipes copied to clipboard

Add pkginfo size output

Open mhrono opened this issue 1 year ago • 6 comments

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

mhrono avatar Aug 26 '23 02:08 mhrono

@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!

mhrono avatar Aug 29 '23 14:08 mhrono

Curious as to why you removed installed_size?

grahampugh avatar Aug 31 '23 22:08 grahampugh

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.

mhrono avatar Aug 31 '23 23:08 mhrono

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.

grahampugh avatar Sep 13 '23 18:09 grahampugh

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 avatar Sep 13 '23 18:09 mhrono

@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.

mhrono avatar Sep 14 '23 15:09 mhrono