Class: ObsDeploy::Zypper
- Inherits:
-
Object
- Object
- ObsDeploy::Zypper
- Defined in:
- lib/obs_deploy/zypper.rb
Instance Attribute Summary collapse
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
Instance Method Summary collapse
-
#add_lock ⇒ Object
TODO check if we want to lock from specific repositories.
-
#initialize(dry_run: true, package_name: 'obs-api') ⇒ Zypper
constructor
A new instance of Zypper.
- #locked? ⇒ Boolean
- #refresh ⇒ Object
- #remove_lock ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(dry_run: true, package_name: 'obs-api') ⇒ Zypper
7 8 9 10 |
# File 'lib/obs_deploy/zypper.rb', line 7 def initialize(dry_run: true, package_name: 'obs-api') @dry_run = dry_run @package_name = package_name end |
Instance Attribute Details
#dry_run ⇒ Object
Returns the value of attribute dry_run.
5 6 7 |
# File 'lib/obs_deploy/zypper.rb', line 5 def dry_run @dry_run end |
Instance Method Details
#add_lock ⇒ Object
TODO check if we want to lock from specific repositories
22 23 24 |
# File 'lib/obs_deploy/zypper.rb', line 22 def add_lock run %w[zypper addlock] + package_name end |
#locked? ⇒ Boolean
30 31 32 33 |
# File 'lib/obs_deploy/zypper.rb', line 30 def locked? # check the return value run %w[zypper locks] + package_name end |
#refresh ⇒ Object
16 17 18 |
# File 'lib/obs_deploy/zypper.rb', line 16 def refresh run %w[zypper --non-interactive --gpg-auto-import-keys refresh] end |
#remove_lock ⇒ Object
26 27 28 |
# File 'lib/obs_deploy/zypper.rb', line 26 def remove_lock run %w[zypper removelock] + package_name end |
#update ⇒ Object
12 13 14 |
# File 'lib/obs_deploy/zypper.rb', line 12 def update run %w[zypper] + update_string + package_name end |