[Title] Fixed not to check dependency when different distribution
authordonghee yang <donghee.yang@samsung.com>
Thu, 11 Oct 2012 10:02:15 +0000 (19:02 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Thu, 11 Oct 2012 10:02:15 +0000 (19:02 +0900)
src/build_server/BuildJob.rb
src/build_server/MultiBuildJob.rb
src/build_server/RegisterPackageJob.rb

index e48b84b3efe3d72f61c7bc6af86e999e44c6b73b..a9ccb695404f73a6a7a07a90ca9e62ecd901a01a 100644 (file)
@@ -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 
index 6d9d588cd28f986014fe4b37600b756b69da4a78..8b4daec832f11bd7eb5cc935cc6f8747db086697 100644 (file)
@@ -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|
index 89722b4bc894afbaeeb47d5c79647e829fde78f8..f141982d2ef0fb2271228935493e105fe117cf8b 100644 (file)
@@ -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