Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Proper handling of configuration conflicts in studio in appliance dif…

…f method
  • Loading branch information...
commit 818923926942be1eed7ee019eae470bd22e1eab9 1 parent a63a596
Yury Tsarev authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.