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



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

def binPath
  Path("bindir")
end

- (String) fontPath

Provide path to font directory of X11

Returns:

  • (String)

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



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

def fontPath
  Path("fontdir")
end

- (String) includePath

Provide path to include directory of X11

Returns:

  • (String)

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



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

def includePath
  Path("includedir")
end

- (String) infoPath

Provide path to info directory of X11

Returns:

  • (String)

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



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

def infoPath
  Path("infodir")
end

- (Object) Initialize

Initialize the paths



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

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



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

def lib64Path
  Path("lib64dir")
end

- (String) libPath

Provide path to lib directory of X11

Returns:

  • (String)

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



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

def libPath
  Path("libdir")
end

- (Object) main



33
34
35
36
37
# 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



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

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



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

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



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

def sharePath
  Path("sharedir")
end