Class: Yast::XVersionClass

Inherits:
Module
  • Object
show all
Defined in:
../../library/general/src/modules/XVersion.rb

Instance Method Summary (collapse)

Instance Method Details

- (String) binPath

Provide path to bin directory of X11

Returns:

  • (String)

    path to /usr/X11R6/bin, resp. /usr/bin



71
72
73
# File '../../library/general/src/modules/XVersion.rb', line 71

def binPath
  Path("bindir")
end

- (String) fontPath

Provide path to font directory of X11

Returns:

  • (String)

    path to /usr/X11R6/font, resp. /usr/font



113
114
115
# File '../../library/general/src/modules/XVersion.rb', line 113

def fontPath
  Path("fontdir")
end

- (String) includePath

Provide path to include directory of X11

Returns:

  • (String)

    path to /usr/X11R6/include, resp. /usr/include



95
96
97
# File '../../library/general/src/modules/XVersion.rb', line 95

def includePath
  Path("includedir")
end

- (String) infoPath

Provide path to info directory of X11

Returns:

  • (String)

    path to /usr/X11R6/info, resp. /usr/info



107
108
109
# File '../../library/general/src/modules/XVersion.rb', line 107

def infoPath
  Path("infodir")
end

- (Object) Initialize

Initialize the paths



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File '../../library/general/src/modules/XVersion.rb', line 39

def Initialize
  keys = SCR.Dir(path(".x_version"))
  if Ops.greater_than(Builtins.size(keys), 0)
    @_paths = {}
    Builtins.foreach(keys) do |k|
      id = Builtins.substring(k, 1)
      Ops.set(
        @_paths,
        id,
        Convert.to_string(SCR.Read(Builtins.add(path(".x_version"), k)))
      )
    end
    Builtins.y2milestone("X11 paths: %1", @_paths)
  else
    Builtins.y2error("Data for XVersion not defined!")
  end

  nil
end

- (String) lib64Path

Provide path to lib64 directory of X11

Returns:

  • (String)

    path to /usr/X11R6/lib64, resp. /usr/lib64



83
84
85
# File '../../library/general/src/modules/XVersion.rb', line 83

def lib64Path
  Path("lib64dir")
end

- (String) libPath

Provide path to lib directory of X11

Returns:

  • (String)

    path to /usr/X11R6/lib, resp. /usr/lib



77
78
79
# File '../../library/general/src/modules/XVersion.rb', line 77

def libPath
  Path("libdir")
end

- (Object) main



33
34
35
36
# File '../../library/general/src/modules/XVersion.rb', line 33

def main
  # All paths related to X server
  @_paths = nil
end

- (String) manPath

Provide path to man directory of X11

Returns:

  • (String)

    path to /usr/X11R6/man, resp. /usr/man



89
90
91
# File '../../library/general/src/modules/XVersion.rb', line 89

def manPath
  Path("mandir")
end

- (String) Path(id)

Provide a path

Parameters:

  • id (String)

    string path identification to provide

Returns:

  • (String)

    required path, nil if not defined



62
63
64
65
# File '../../library/general/src/modules/XVersion.rb', line 62

def Path(id)
  Initialize() if @_paths.nil?
  Ops.get(@_paths, id)
end

- (String) sharePath

Provide path to share directory of X11

Returns:

  • (String)

    path to /usr/X11R6/share, resp. /usr/share



101
102
103
# File '../../library/general/src/modules/XVersion.rb', line 101

def sharePath
  Path("sharedir")
end