Hi Hackers,
for fate #302971 I had to implement a lock for libstorage. This
has some consequences for everyone using storage in YaST.
The initialisation of libstorage fails if there is another
process holding a lock. I have extended Storage::InitLibstorage
to display a popup in that case (unfinished). The user can retry
to initialise libstorage.
The problem is that so far nobody explicitly initialises
libstorage. This is more or less required now since you have to
take action when locking fails (e.g. gracefully abort). So call
Storage::InitLibstorage(readonly) before doing any other storage
calls. You can set readonly to true if you are sure your code and
no code you call modifies storage.
If you do not call Storage::InitLibstorage() the first storage
function will do so. But if initialisation fails all storage
functions requiring libstorage return nil (if they return
anything) or crash (if they don't check for proper
initialisation).
Comments for improvement to the situation are welcome.
ciao
Arvin
--
Arvin Schnell, <aschnell(a)suse.de>
Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: yast-announce+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-announce+help(a)opensuse.org