Darren J Moffat wrote:
Why do I have to explicitly refresh after publishing a new version of a package to my repo [ which is on a remove machine ] ?

As a performance tradeoff (cost of connection to server, checking catalog metadata, etc.) the client by default only retrieves new catalog data once every four hours so that if you perform repeated install operations, etc. you don't spend extra time waiting.

This is only a default, and can currently be controlled via the property 'refresh_seconds' found in /var/pkg/cfg_cache on a per-publisher basis. The standard disclaimer is that this is "not an interface", and that this functionality is still in evaluation which is why there is no user exposure of it yet.

If you want the client to always connect to the server for an implicit refresh, set this property to 0.

However I need to actually restart pkg.depotd and again do 'pkg refresh'
before I get an install to work.

What do you mean 'restart pkg.depotd'. How did you publish the package? via http? or via file:// ? If you use file://, then yes, you have to either restart the pkg.depotd server or send a SIGUSR1 to the depot server to trigger a 'graceful restart' similar to Apache where you have changed configuration and need it to reload the configuration information.

This is confusing since there is a --no-refresh option of 'pkg install' which implies that the refresh is implicit.

refresh is implicitly done *if it is time to do so* (i.e. four hours (by default) have elapsed since the last successful refresh). This prevents adding possibly several seconds to each operation that is performed just to connect to the server and retrieve/check catalog data. The --no-refresh just completely disables the implicit behaviour altogether.

This behaviour is fairly similar in nature to other packaging systems with the exception that none of them have implicit refresh at last check...

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to