Class: Y2Packager::LicensesFetchers::Libzypp
- Defined in:
- library/packages/src/lib/y2packager/licenses_fetchers/libzypp.rb
Overview
This class is responsible for obtaining the license and license content of a given product from libzypp.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#confirmation_required? ⇒ Boolean
Determine whether the license should be accepted or not.
-
#locales ⇒ Array<String>
Return available locales for product's license.
Methods inherited from Base
#content, #found?, #initialize
Constructor Details
This class inherits a constructor from Y2Packager::LicensesFetchers::Base
Instance Method Details
#confirmation_required? ⇒ Boolean
Determine whether the license should be accepted or not
39 40 41 |
# File 'library/packages/src/lib/y2packager/licenses_fetchers/libzypp.rb', line 39 def confirmation_required? Yast::Pkg.PrdNeedToAcceptLicense(product_name) end |
#locales ⇒ Array<String>
Return available locales for product's license
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'library/packages/src/lib/y2packager/licenses_fetchers/libzypp.rb', line 23 def locales locales = Yast::Pkg.PrdLicenseLocales(product_name) if locales.nil? log.error "Error getting the list of available license translations for '#{product_name}'" return [] end empty_idx = locales.index("") locales[empty_idx] = DEFAULT_LANG if empty_idx locales end |