From: donghee yang Date: Thu, 11 Oct 2012 10:02:15 +0000 (+0900) Subject: [Title] Fixed not to check dependency when different distribution X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fa488765d0c75e71db4060e8d5dfc47b05a675a;p=sdk%2Ftools%2Fsdk-build.git [Title] Fixed not to check dependency when different distribution --- diff --git a/src/build_server/BuildJob.rb b/src/build_server/BuildJob.rb index e48b84b..a9ccb69 100644 --- a/src/build_server/BuildJob.rb +++ b/src/build_server/BuildJob.rb @@ -116,6 +116,11 @@ class BuildJob < CommonJob end + def get_distribution_name() + return @project.dist_name + end + + def get_buildroot() return @buildroot_dir end @@ -276,6 +281,11 @@ class BuildJob < CommonJob def is_compatible_with?(o) + # must have same distribution + if get_distribution_name() != o.get_distribution_name() then + return false + end + if type != o.type then return false end my_project = get_project() @@ -317,6 +327,11 @@ class BuildJob < CommonJob def has_same_packages?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end + # same package must have same os if not @os.eql? wjob.os then return false @@ -338,6 +353,11 @@ class BuildJob < CommonJob def does_depend_on?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end + # compare build dependency get_build_dependencies(@os).each do |dep| wjob.get_packages().each do |wpkg| @@ -357,6 +377,11 @@ class BuildJob < CommonJob def does_depended_by?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end + get_packages().each do |pkg| wjob.get_build_dependencies(wjob.os).each do |dep| # dep package of working job must have same name and target os diff --git a/src/build_server/MultiBuildJob.rb b/src/build_server/MultiBuildJob.rb index 6d9d588..8b4daec 100644 --- a/src/build_server/MultiBuildJob.rb +++ b/src/build_server/MultiBuildJob.rb @@ -68,6 +68,11 @@ class MultiBuildJob < CommonJob end + def get_distribution_name() + first_project = @sub_jobs[0].get_project().dist_name + end + + def get_buildroot() return @buildroot_dir end @@ -234,6 +239,10 @@ class MultiBuildJob < CommonJob def has_same_packages?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end # same package must have same os if not @os.eql? wjob.os then @@ -255,6 +264,10 @@ class MultiBuildJob < CommonJob def does_depend_on?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end # compare build dependency get_build_dependencies(@os).each do |dep| @@ -274,6 +287,10 @@ class MultiBuildJob < CommonJob def does_depended_by?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end get_packages().each do |pkg| wjob.get_build_dependencies(wjob.os).each do |dep| diff --git a/src/build_server/RegisterPackageJob.rb b/src/build_server/RegisterPackageJob.rb index 89722b4..f141982 100644 --- a/src/build_server/RegisterPackageJob.rb +++ b/src/build_server/RegisterPackageJob.rb @@ -95,6 +95,11 @@ class RegisterPackageJob < CommonJob end + def get_distribution_name() + return @project.dist_name + end + + def get_buildroot() return @buildroot_dir end @@ -270,6 +275,11 @@ class RegisterPackageJob < CommonJob def has_same_packages?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end + if @type != wjob.type then return false end case @pkg_type @@ -293,6 +303,11 @@ class RegisterPackageJob < CommonJob def does_depended_by?( wjob ) + # must have same distribution + if get_distribution_name() != wjob.get_distribution_name() then + return false + end + if @pkg_type == "BINARY" then wjob.get_build_dependencies(wjob.os).each do |dep| # dep package of working job must have same name and target os