I'm thinking about adding a simple feature to libstorage-ng that I hope
will be useful to simplify the implementation of some YaST stuff. An
extra attribute Device#extra_info that the users of the library (YaST in
our case) could use to store any arbitrary information associated to
each device in the devicegraph as a free-form string.

Why?

While implementing advanced handling of Btrfs subvolumes in the new
expert partitioner together with Iván, I found myself in a similar
situation for second time in a short period of time. That is,
implementing a rather complex and error-prone solution for something
that could be implemented in a much more straightforward way by adding
some YaST-specific attributes to the libstorage objects. In this
particular case, having the fields BtrfsSubvolume#auto_added and maybe
also Btrfs#subvols_to_restore.

Polluting libstorage-ng with such purpose-specific fields that has
nothing to do with the general libstorage goal doesn't look like a
bright idea. But offering a general-purpose "container" attribute would
be just a few lines of code in libstorage-ng and I can see a lot of
potential to simplify YaST code.

What do you think? Anybody against?

Cheers.
-- 
Ancor González Sosa
YaST Team at SUSE Linux GmbH
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to