Class: Yast::PackageAIClass

Inherits:
Module
  • Object
show all
Defined in:
library/packages/src/modules/PackageAI.rb

Instance Method Summary collapse

Instance Method Details

#Available(_package) ⇒ Boolean

Note:

In AutoYaST, this method always returns true.

Determines whether the package is available or not

Parameters:

  • package (String)

    Package name

Returns:

  • (Boolean)

    true if the package exists; false otherwise

See Also:



72
73
74
# File 'library/packages/src/modules/PackageAI.rb', line 72

def Available(_package)
  true
end

#DoInstallAndRemove(toinst, torem) ⇒ Boolean

Note:

In AutoYaST, packages are added or removed from the packages proposal instead of actually installing or removing them from the system.

Install and remove packages in one go

Parameters:

  • toinstall (Array<String>)

    Name of the packages to install

  • toremove (Array<String>)

    Name of the packages to remove

Returns:

  • (Boolean)

    true on success

See Also:



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'library/packages/src/modules/PackageAI.rb', line 51

def DoInstallAndRemove(toinst, torem)
  if !toinst.empty?
    Yast::PackagesProposal.AddResolvables("autoyast", :package, toinst)
    Yast::PackagesProposal.RemoveTaboos("autoyast", :package, toinst)
  end

  if !torem.empty?
    Yast::PackagesProposal.AddTaboos("autoyast", :package, torem)
    Yast::PackagesProposal.RemoveResolvables("autoyast", :package, torem)
  end

  true
end

#Installed(package) ⇒ Boolean

Note:

In AutoYaST, this method just checks whether the package is included in the packages proposal.

Determines whether the package is installed or not

Parameters:

  • package (String)

    Package name

Returns:

  • (Boolean)

    true if the package exists; false otherwise

See Also:



85
86
87
# File 'library/packages/src/modules/PackageAI.rb', line 85

def Installed(package)
  PackagesProposal.GetResolvables("autoyast", :package).include?(package)
end

#InstallKernel(_kernel_modules) ⇒ Boolean

Note:

The kernel packages are handled by AutoYaST on its own, so this method just does nothing and always returns true.

Installs the given kernel modules

Parameters:

  • _kernel_modules (Array<String>)

    Names of the kernel modules to install

Returns:

  • (Boolean)

    Always returns true

See Also:



120
121
122
# File 'library/packages/src/modules/PackageAI.rb', line 120

def InstallKernel(_kernel_modules)
  true
end

#mainObject



36
37
38
# File 'library/packages/src/modules/PackageAI.rb', line 36

def main
  textdomain "base"
end

#PackageAvailable(package) ⇒ Boolean

Note:

In AutoYaST this method is equivalent to #Available

Determines whether the package with the given name is available

Parameters:

  • package (String)

    Package name

Returns:

  • (Boolean)

    true if the package is available; false otherwise

See Also:



108
109
110
# File 'library/packages/src/modules/PackageAI.rb', line 108

def PackageAvailable(package)
  Available(package)
end

#PackageInstalled(package) ⇒ Boolean

Note:

In AutoYaST this method is equivalent to #Installed

Determines whether the package is installed or not

Parameters:

  • package (String)

    Package name

Returns:

  • (Boolean)

    true if the package exists; false otherwise

See Also:



97
98
99
# File 'library/packages/src/modules/PackageAI.rb', line 97

def PackageInstalled(package)
  Installed(package)
end