Method: Yast::PackageClass#DoInstallAndRemove

Defined in:
library/packages/src/modules/Package.rb

#DoInstallAndRemove(toinstall, toremove) ⇒ Boolean

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



211
212
213
214
215
216
217
218
219
220
221
# File 'library/packages/src/modules/Package.rb', line 211

def DoInstallAndRemove(toinstall, toremove)
  ret = backend.DoInstallAndRemove(toinstall, toremove)
  return false unless ret

  if !InstalledAll(toinstall)
    log.error("Required packages have not been installed")
    return false
  end

  true
end