Shawn Walker wrote:
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.

That sounds like a good default.

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.

I had managed to work that out after sending my original message by reading the source, thanks.

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.

It was a file:// URI since that is what the on-ips bits use. I switched it to a http:// URI and the restart wasn't needed after that.

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

Makes perfect sense for the general use case. People updating the same package(s) lots of times in a short period of time (ie less than the default 4hrs) aren't exactly normal use cases.

--
Darren J Moffat
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to