Class: Yast::XVersionClass

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

Instance Method Summary collapse

Instance Method Details

#binPathString

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

#fontPathString

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

#includePathString

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

#infoPathString

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

#InitializeObject

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

#lib64PathString

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

#libPathString

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

#mainObject



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

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

#manPathString

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

#Path(id) ⇒ String

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

#sharePathString

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