What | Removed | Added |
---|---|---|
Flags | needinfo?(ma@suse.com) |
Question is WHO runs such a collector?
If it is called from within the plugin packages %post, then it will most
probably not work if the package is installed using the DVD install (using any
offline install/update). AFAIK yast does not transfer the repos into the system
before the installation has ended. So a collector won't see the repos in use.
Installing the package in a running system however it would be possible to call
e.g.
> ZYPP_PLUGIN_APPDATA_FORCE_COLLECT=1 zypper -n lr >/dev/null 2>&1
from within the plugin packages %post(if initial install: $1==1). 'zypper lr'
is readonly, so you can call it even from within a zypper install.
The appdata plugin package could provide a shell script called e.g.
zypper-appdatarefresh, executing the above line (maybe supporting
'zypper-appdatarefresh --force' executing 'zypper -n ref -f' instead). Then you
can call 'zypper-appdatarefresh' in your %post($1==1).
People can easily call 'zypper-appdatarefresh' manually (as root!) if the
initial install did not collect the data. If it's installed in $PATH, it'll be
available as 'zypper appdatarefresh' too, 'zypper help appdatarefresh' will
display the manpage for 'zypper-appdatarefresh' (if you provide one).
If that's ok, I'd adapt libzypp to evaluate $ZYPP_PLUGIN_APPDATA_FORCE_COLLECT.