-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
pm-update: respect only_check value #3809
Conversation
Oh. There's another invocation, but without the CLI params access. Don't really know what to do then :/
Still, would it make sense to erase only the older packages instead of everything not contained in the platform manifest? atm it purges anything installed manually through |
I was tracking the flow via pdb: diff --git a/platformio/package/manager/platform.py b/platformio/package/manager/platform.py
index 7626d4d9..0a5ad4a7 100644
--- a/platformio/package/manager/platform.py
+++ b/platformio/package/manager/platform.py
@@ -148,6 +148,8 @@ class PlatformPackageManager(BasePackageManager): # pylint: disable=too-many-an
]
if any(skip_conds):
continue
+ import pdb
+ pdb.set_trace()
try:
pm.uninstall(pkg.metadata.spec)
except UnknownPackageError: ef6e70a still does try to delete the toolchain package (which I tried to avoid via the package owner check)
|
See latest commits: https://github.com/platformio/platformio-core/commits/develop We removed a code for automatic package removal. Now, everyone will personally decide when to run We will add a new setting where PIO will check for "unnecessary" packages 1 time per week and will inform users. But, it will never remove these packages automatically. What do you think about this approach? We have a similar Linux OS for the APT package manager. See update docs https://docs.platformio.org/en/latest/core/userguide/system/cmd_prune.html |
I would agree, but not a big fan of the reminders though. I wonder if it should match certain thresholds for size / amount of packages / amount of other stuff, but not the periods of time? Also note that it still wants to remove the custom package:
|
Thanks, great idea! How do you think, which threshold is good for default? 1Gb?
Yes, it's correct behavior. See "note" https://docs.platformio.org/en/latest/core/userguide/system/cmd_prune.html |
So, the default threshold is 1Gb 2c389ae |
May be ok. It depends though on most common use case e.g. judging by the size of the xtensa toolchain + framework it is already 360MB by itself, gccarm + nrf52 is around 460MB, so 1GB would trigger around the time there are around 3 outdated packages (not counting the cached files though).
I mean, I did indent to install it through the package overrides via the registry download. Should pm auto-create those? I still kind of like the owner check, meaning PIO itself only manages the "platformio" packages, leaving user packages alone. Both registry-downloaded or the things placed into the ~/.platformio/packages manually |
We don't manage only So, if you have a dev-platform that referees to a custom package, PlatformIO will not list it for "prune". |
I mean the packages that came from platformio platform's manifest file, I though those exclusively have owner="platformio"? From my POV, I'd need to maintain platform fork (and supply updates) + .ini change instead of just the .ini change. |
Please share |
The espurna's .ini just refers to the |
It seems that we talk about the same but have different in a mind. What is your proposal?
Again, the goal of |
I think the gist of my issue so far is that PIO has no way of tracking that package origins when it is installed through the platform_packages = ... directive. Which is understandable, since without a platform there's no way to refer back to it (...unless package manager metadata refers to the .ini file?) |
Not to put this into another loop, but...
Which is explicitly requested through the .ini declaration Also sorry for misunderstanding the platform <-> packages relation which created the misunderstanding to begin with... and I'd open another issue, but most of the discussion is already here. |
We are going to release PlatformIO Core 5.1 in the next few hours. Please file a new issue at https://github.com/platformio/platformio-core/issues |
Related to the #3770
Don't uninstall the package when user-provided --dry-run / --only-check param (i.e. only_check var is True)