Class: Zypper::Repository
- Inherits:
-
Object
- Object
- Zypper::Repository
- Includes:
- ZypperUtils
- Defined in:
- lib/zypper/repository.rb
Constant Summary
Constants included from ZypperUtils
ZypperUtils::ATTRIBUTE_STARTS_WITH, ZypperUtils::PARAMS_FOR_TYPES, ZypperUtils::XML_COMMANDS_GET
Instance Attribute Summary
Attributes included from ZypperUtils
#config, #last_error_message, #last_exit_status, #last_message
Instance Method Summary collapse
-
#add(options = {}) ⇒ Object
Adds a new repository defined by options (string) :url URL/URL (string) :alias.
-
#all(options = {}) ⇒ Object
Lists all known repositories.
-
#refresh(options = {}) ⇒ Object
Refreshes repositories @param (optional) options :force - to force the refresh :force_rebuild - forces rebuilding the libzypp database.
-
#remove(options = {}) ⇒ Object
Removes a repository defined by options (string) :alias.
Methods included from ZypperUtils
Instance Method Details
#add(options = {}) ⇒ Object
Adds a new repository defined by options
(string) :url URL/URL
(string) :alias
24 25 26 |
# File 'lib/zypper/repository.rb', line 24 def add( = {}) run build_command('addrepo', ) end |
#all(options = {}) ⇒ Object
Lists all known repositories
16 17 18 19 |
# File 'lib/zypper/repository.rb', line 16 def all( = {}) out = xml_run build_command('repos', .merge(:get => XML_COMMANDS_GET)) convert_output(out.fetch(:stream, {}).fetch(:repo_list, {}).fetch(:repo, []), :repo) end |
#refresh(options = {}) ⇒ Object
Refreshes repositories
@param (optional) options
:force - to force the refresh
:force_rebuild - forces rebuilding the libzypp database
11 12 13 |
# File 'lib/zypper/repository.rb', line 11 def refresh( = {}) run build_command('refresh', ) end |
#remove(options = {}) ⇒ Object
Removes a repository defined by options
(string) :alias
30 31 32 |
# File 'lib/zypper/repository.rb', line 30 def remove( = {}) run build_command('removerepo', ) end |