Mailinglist Archive: yast-devel (55 mails)

< Previous Next >
[yast-devel] Good bye TargetMap
As mentioned in today's call, we finally have an installable system
based on libstorage-ng. That means we are at the point of changing big
chunks of code to stop using the infamous TargetMap. The first victim
(at least the first with significant changes) was yast2-bootloader. So I
wanted to use the opportunity to show how those changes look like.

Now, instead of querying the TargetMap we query the staging Devicegraph.
The good thing is that the latter is not a huge nested hash with strings
as keys, but a graph that contains meaningful objects and relations
among them. The changes illustrated in this mail are intentionally
restricted to just be a direct translation from TargetMap to
Devicegraph, no re-thinking or refactoring.

So here you are
https://gist.github.com/ancorgs/1d99477acc55c475a150f038d247cf96

The new code shown above heavily relies on DevicesList, a layer on top
of the libstorage-ng API provided by yast-storage-ng with the goal of
making the whole thing more Ruby-friendly. It was first discussed quite
some time ago in this thread
https://lists.opensuse.org/yast-devel/2016-03/msg00053.html

We can, of course, use the diff above to discuss about possible changes
in the libstorage-ng or yast-storage-ng APIs, but PLEASE first take a
look to the previous discussions to avoid the Groundhog Day effect.

Storage Redesign - 24 Oct 2014
https://lists.opensuse.org/yast-devel/2014-10/msg00045.html

RFC - New Storage API - 3 Dec 2014
https://lists.opensuse.org/yast-devel/2014-12/msg00016.html

Some notes about the new storage API - 7 Oct 2015
https://lists.opensuse.org/yast-devel/2015-10/msg00115.html

High level notes about new storage API - 21 Oct 2015
https://lists.opensuse.org/yast-devel/2015-10/msg00190.html

Returning NULL pointers vs. throwing exceptions - 24 Nov 2015
https://lists.opensuse.org/yast-devel/2015-11/msg00114.html

Cheers
--
Ancor González Sosa
YaST Team at SUSE Linux GmbH
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages