diff --git a/lib/const.rb b/lib/const.rb index 883e51ef8..eb82531c0 100644 --- a/lib/const.rb +++ b/lib/const.rb @@ -1,6 +1,6 @@ # Defines common constants used in different parts of crew -CREW_VERSION = '1.16.2' +CREW_VERSION = '1.16.3' ARCH_ACTUAL = `uname -m`.strip # This helps with virtualized builds on aarch64 machines diff --git a/lib/package.rb b/lib/package.rb index 07bc14d9b..1c5f4a010 100644 --- a/lib/package.rb +++ b/lib/package.rb @@ -41,8 +41,8 @@ class Package if !@build_from_source and @binary_url and @binary_url.has_key?(architecture) return @binary_url[architecture] else - if @source_url.has_key?(architecture) - return @source_url[architecture] + if @source_url.respond_to?(:has_key?) + return @source_url.has_key?(architecture) ? @source_url[architecture] : nil else return @source_url end @@ -61,8 +61,8 @@ class Package if !@build_from_source and @binary_sha256 and @binary_sha256.has_key?(architecture) return @binary_sha256[architecture] else - if @source_sha256.has_key?(architecture) - return @source_sha256[architecture] + if @source_sha256.respond_to?(:has_key?) + return @source_sha256.has_key?(architecture) ? @source_sha256[architecture] : nil else return @source_sha256 end