Skip to content
Browse files

Proper handling of configuration conflicts in studio in appliance dif…

…f method
  • Loading branch information...
1 parent a63a596 commit 818923926942be1eed7ee019eae470bd22e1eab9 Yury Tsarev committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/handlers/appliance.rb
View
3 lib/handlers/appliance.rb
@@ -66,7 +66,10 @@ def status
end
desc "appliance diff", "difference between RPMs installed on current machine and SUSE Studio configuration"
+ require_appliance_id
def diff
+ appliance_state = self.status
+ raise appliance_state if appliance_state != "Appliance Ok"
# get list of installed packages
rpm_output = `rpm -qa --qf '%{NAME}#%{VERSION}-%{RELEASE}$'`.split('$').sort # TODO: bug check exit code
rpm_output.delete_if {|x| x["gpg-pubkey"] } # remove SUSE gpg-pubkey package

0 comments on commit 8189239

Please sign in to comment.
Something went wrong with that request. Please try again.