5 Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
8 Taejun Ha <taejun.ha@samsung.com>
9 Jiil Hyoun <jiil.hyoun@samsung.com>
10 Donghyuk Yang <donghyuk.yang@samsung.com>
11 DongHee Yang <donghee.yang@samsung.com>
13 Licensed under the Apache License, Version 2.0 (the "License");
14 you may not use this file except in compliance with the License.
15 You may obtain a copy of the License at
17 http://www.apache.org/licenses/LICENSE-2.0
19 Unless required by applicable law or agreed to in writing, software
20 distributed under the License is distributed on an "AS IS" BASIS,
21 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 See the License for the specific language governing permissions and
23 limitations under the License.
29 $LOAD_PATH.unshift File.dirname(__FILE__)
33 attr_accessor :package_name, :comp, :base_version, :target_os_list
34 def initialize (package_name, comp, base_version, target_os_list)
35 @package_name = package_name
37 @base_version = base_version
38 @target_os_list = target_os_list
42 string = @package_name
43 if not @comp.nil? and not @base_version.nil? then
44 string = string + " ( #{@comp} #{@base_version} )"
47 if not @target_os_list.empty? then
48 string = string + " [ #{@target_os_list.join("|")} ]"
58 # compare to base version
60 return Version.new(ver) > Version.new(@base_version)
62 return Version.new(ver) >= Version.new(@base_version)
64 return Version.new(ver) == Version.new(@base_version)
66 return Version.new(ver) <= Version.new(@base_version)
68 return Version.new(ver) < Version.new(@base_version)