Changeset 2464 in ProjectBuilder
- Timestamp:
- Jan 18, 2020, 7:37:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r2463 r2464 2626 2626 my $cidfile; 2627 2627 my $homedir = ""; 2628 my $origimage = undef; 2629 my $cmdverb = "verbose"; 2630 if (($cmt eq "Announce") || ($cmt eq "CPAN")) { 2631 $cmdverb = undef; 2632 } elsif (defined ($v)) { 2633 $cmdverb = "verbose_\[$v\] "; 2634 } 2628 2635 if ($cmt =~ /^VE/) { 2629 2636 $tp = pb_path_expand($vepath->{$ENV{'PBPROJ'}}); … … 2673 2680 # TODO: we don't do anything with found !! 2674 2681 my $found = pb_ve_docker_get_image($tag{$pbstep}); 2675 my $origimage = undef; 2676 if (($pbstep > 3) && (not defined $found)) { 2677 # initiate these images from the last n-v-a-pb-pbproj below 2678 $found = 0; 2679 $origimage = "$tag{3}"; 2682 if ($pbstep > 3) { 2683 # initiate these images from the last n-v-a-pb-pbproj below, removing existing ones 2684 if (defined $found) { 2685 pb_system("$cmd1 rmi $tag{$pbstep}","Removing Docker image $tag{$pbstep} first",$cmdverb); 2686 } 2687 $origimage = "$tag{3}"; 2688 $found = 0; 2680 2689 } else { 2681 2690 $origimage = "$tag{$pbstep}"; 2682 2691 } 2683 2692 cluck "No image $tag{$pbstep} available in Docker, please create one first\n" if (not defined $found); … … 2704 2713 #$shcmd = "$cmd1 build $dockeropt->{$ENV{'PBPROJ'}} -t $tag{$pbstep+1} $context"; 2705 2714 } elsif ($pbstep > 3) { 2706 # We force the destruciton of the image before recreating it for install or test 2707 $shcmd = "$cmd1 rmi $tag{$pbstep} ; "; 2708 $shcmd .= "$cmd1 build -t $tag{$pbstep} $context ; "; 2709 $shcmd .= "$cmd1 run $rmatend --cidfile=\"$cidfile\" --user $dkaccount --name $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}-$cmt "; 2715 $shcmd = "$cmd1 build -t $tag{$pbstep} $context ; "; 2716 $shcmd .= "$cmd1 run $rmatend --cidfile=\"$cidfile\" --user $dkaccount --name $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}-$ENV{'PBPROJ'}"; 2710 2717 } else { 2711 2718 # pbstep 3 … … 2728 2735 if ($pbstep >= 2) { 2729 2736 # We need to get the home dir of the target account to deliver in the right place 2730 $homedir = `$cmd1 run --rm --cidfile="$cidfile" $ tag{$pbstep}grep -E '^$dkaccount:' /etc/passwd | cut -d: -f6`;2737 $homedir = `$cmd1 run --rm --cidfile="$cidfile" $origimage grep -E '^$dkaccount:' /etc/passwd | cut -d: -f6`; 2731 2738 chomp($homedir); 2732 2739 open(CID,"$cidfile") || cluck "Unable to open $cidfile"; … … 2886 2893 $shcmd .= " \"echo \'cd $tdir ; if [ -x $s ]; then ./$s; fi ; if [ $pbkeep == 0 ]; then rm -f $s; fi\' | bash\""; 2887 2894 } 2888 }2889 my $cmdverb = "verbose";2890 if (($cmt eq "Announce") || ($cmt eq "CPAN")) {2891 $cmdverb = undef;2892 } elsif (defined ($v)) {2893 $cmdverb = "verbose_\[$v\] ";2894 2895 } 2895 2896 # this is where we launch the execution
Note:
See TracChangeset
for help on using the changeset viewer.