[Title] Show error message when use build-dep/install-dep before updating remote...
authordonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 12 Feb 2013 07:10:38 +0000 (16:10 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 12 Feb 2013 07:10:38 +0000 (16:10 +0900)
pkg-cli

diff --git a/pkg-cli b/pkg-cli
index eff2d9d16bbc10b30605fa960e7ccc8e9b659953..0a9717c6bea90230ba938ee7d926e047c5b72187 100755 (executable)
--- a/pkg-cli
+++ b/pkg-cli
@@ -124,6 +124,10 @@ when "list-lpkg" then
 when "build-dep" then
        client = Client.new( nil, nil, nil )
        result = client.get_build_dependent_packages( option[:pkg], option[:os], true )
+       if result.nil? then
+               puts "Error: Failed to get remote package list. try update first."
+               exit 1
+       end                     
        ret = ""
        result.each do |i|
                ret = ret + i + " --> "
@@ -134,6 +138,10 @@ when "build-dep" then
 when "install-dep" then
        client = Client.new( nil, nil, nil )
        result = client.get_install_dependent_packages( option[:pkg], option[:os], true, false )
+       if result.nil? then
+               puts "Error: Failed to get remote package list. try update first."
+               exit 1
+       end                     
        ret = ""
        result.each do |i|
                ret = ret + i + " --> "