Skip to content
This repository
Browse code

Proper handling of configuration conflicts in studio in appliance dif…

…f method
  • Loading branch information...
commit 818923926942be1eed7ee019eae470bd22e1eab9 1 parent a63a596
authored June 20, 2012

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  lib/handlers/appliance.rb
3  lib/handlers/appliance.rb
@@ -66,7 +66,10 @@ def status
66 66
       end
67 67
 
68 68
       desc "appliance diff", "difference between RPMs installed on current machine and SUSE Studio configuration"
  69
+      require_appliance_id
69 70
       def diff
  71
+        appliance_state = self.status
  72
+        raise appliance_state if appliance_state != "Appliance Ok"
70 73
         # get list of installed packages
71 74
         rpm_output = `rpm -qa --qf '%{NAME}#%{VERSION}-%{RELEASE}$'`.split('$').sort # TODO: bug check exit code
72 75
         rpm_output.delete_if {|x| x["gpg-pubkey"] } # remove SUSE gpg-pubkey package

0 notes on commit 8189239

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