Changed `working_on_source?` function to `is_source?` and re-organized checking mechanism

parent 74f62363
......@@ -169,7 +169,7 @@ end
def download
url = @pkg.get_url(@device[:architecture])
source = @pkg.working_on_source?(@device[:architecture])
source = @pkg.is_source?(@device[:architecture])
if !source
puts "Precompiled binary available, downloading..."
......@@ -418,7 +418,7 @@ end
def build_package (pwd)
abort "It is not possible to build fake package" if @pkg.is_fake?
abort "It is not possible to build without source" if !@pkg.working_on_source?(@device[:architecture])
abort "It is not possible to build without source" if !@pkg.is_source?(@device[:architecture])
# download source codes and unpack it
meta = download
......
......@@ -23,8 +23,16 @@ class Package
end
end
def self.working_on_source? (architecture)
def self.is_binary? (architecture)
if !@build_from_source && @binary_url && @binary_url.has_key?(architecture)
return true
else
return false
end
end
def self.is_source? (architecture)
if is_binary?(architecture) || is_fake?
return false
else
return true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment