How to force `buildout` to reload a single `egg`?

Is there a way to force buildout to reload a single egg from the directory specified in find-links?

If the egg has already been installed and it exists in ${PLONE_HOME}/buildout-cache/eggs and ${PLONE_HOME}/buildout-cache/downloads/dist it will not be reloaded from ${buildout:directory}/eggs/ (see below):

eggs +=
find-links +=

My workaroud at the moment is to delete the addon from buildout-cache/eggs and buildout-cache/downloads/dist

sudo rm -rf ${PLONE_HOME}/buildout-cache/eggs/cp39/some.addon*
sudo rm -rf ${PLONE_HOME}/buildout-cache/downloads/dist/some.addon*

Removing a package is also my solution. I am not aware of a specific buildout solution rather pinning a different version of a package or using mr.developer with source checkouts.

I don't understand why the "reload". Has the environment changed? If it's a newer version, it should be pinned in the buildout. Old versions are kept in the eggs directory.

Our use case is a reference environment on which we push only eggs, not sources (customer's policy). Those eggs are still in development and we push them without changing the version number, as "dayly builds". Obviously not best practice at all. But development in huge companies is sometimes kind of idiosyncrazy.

I don't know how the code is sent, but if the environment has access to version control, you can use mr.developer instead of sending as an egg. If you don't have access, you can use the develop parameter of the buildout:

develop = src/some.addon

1 Like

Thanks. I'm well aware of this. But, as mentioned, there are peculiar policies.

Updating an egg this thread has some hints also on adding/removing an egg without running buildout.

Having a command to add/update/remove an egg from the instance without re running buildout would be cool.