build-gnome2
changeset 1741 b1f564a7fc6e
parent 1418 d6ff07e7887d
child 2369 f48652db5085
equal deleted inserted replaced
1740:2461fd9182ba 1741:b1f564a7fc6e
   603     }
   603     }
   604     chomp $rpm;
   604     chomp $rpm;
   605     return ($rpm);
   605     return ($rpm);
   606 }
   606 }
   607 
   607 
       
   608 sub spec_id_of ($) {
       
   609     my $name = shift;
       
   610 
       
   611     for (my $i = 0; $i <= $#specs_to_build; $i++) {
       
   612 	if ($specs_to_build[$i]->{name} eq $name) {
       
   613 	    return $i;
       
   614 	}
       
   615     }
       
   616 
       
   617     return undef;
       
   618 }
       
   619 
   608 sub install_good_rpms ($) {
   620 sub install_good_rpms ($) {
   609     my $spec_id = shift;
   621     my $spec_id = shift;
   610     my $spec = $specs_to_build[$spec_id];
   622     my $spec = $specs_to_build[$spec_id];
   611 
   623 
   612     my @rpms =  $spec->get_param_array ('rpms');
   624     my @rpms =  $spec->get_param_array ('rpms');
  1073 	    $this_result = check_dependency ($spec_id, $dep,
  1085 	    $this_result = check_dependency ($spec_id, $dep,
  1074 					     \&build_spec, \&warn_always, ());
  1086 					     \&build_spec, \&warn_always, ());
  1075 	    if (!$this_result) {
  1087 	    if (!$this_result) {
  1076 		if (defined ($the_good_build_dir)) {
  1088 		if (defined ($the_good_build_dir)) {
  1077 		    msg_info (0, "Attempting to use a known good rpm");
  1089 		    msg_info (0, "Attempting to use a known good rpm");
  1078 		    $this_result = install_good_rpms ($dep);
  1090 		    $this_result = install_good_rpms (spec_id_of ($dep));
  1079 		}
  1091 		}
  1080 		if (! $this_result) {
  1092 		if (! $this_result) {
  1081 		    msg_warning (1, "$spec->{name} requires $dep");
  1093 		    msg_warning (1, "$spec->{name} requires $dep");
  1082 		}
  1094 		}
  1083 	    }
  1095 	    }