You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This runs an apt update if needed, to ensure that the install actually works (it can fail if the lists are outdated).
However, currently this runs the apt update every hour, even if the specified packages are already installed and no further action is needed (and because upgrade=False and latest=False, which are the defaults, there is AFAICS also no way that running the update could cause a package to be installed/upgraded that would not be without running the update). In practice, this means every pyinfra run takes quite long, even when just making a small other change...
Describe the solution you'd like
When update is specified, but not upgrade or latest, only run the apt update when any packages are missing. If latest and/or upgrade are specified, then the behavior must remain as now, since the update needs to be run to decide whether any packages can be upgraded.
This is a change in behavior, but the documentation says "update: run apt update before installing packages", so the proposed behavior would (IMHO) better implement the documentation - run update only before/when actually installing packages.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
I'm using this to install packages:
This runs an apt update if needed, to ensure that the install actually works (it can fail if the lists are outdated).
However, currently this runs the
apt update
every hour, even if the specified packages are already installed and no further action is needed (and becauseupgrade=False
andlatest=False
, which are the defaults, there is AFAICS also no way that running the update could cause a package to be installed/upgraded that would not be without running the update). In practice, this means every pyinfra run takes quite long, even when just making a small other change...Describe the solution you'd like
When
update
is specified, but notupgrade
orlatest
, only run theapt update
when any packages are missing. Iflatest
and/orupgrade
are specified, then the behavior must remain as now, since the update needs to be run to decide whether any packages can be upgraded.This is a change in behavior, but the documentation says "update: run apt update before installing packages", so the proposed behavior would (IMHO) better implement the documentation - run update only before/when actually installing packages.
The text was updated successfully, but these errors were encountered: