- Timestamp:
- Feb 24, 2011, 1:51:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r1215 r1216 1617 1617 ($vtmout) = pb_conf_get($tmout); 1618 1618 } 1619 my $sshmachine = $sshhost->{$ENV{'PBPROJ'}}; 1620 if ($cmt =~ /^RM/) { 1621 # In that case our real host is in the rmhost with the OS as key, not project as above 1622 $sshmachine = pb_distro_get_param($pbos,$sshhost); 1623 } 1624 pb_log(2,"ssh: ".Dumper(($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vepath,$rbsconf))."\n"); 1619 my $remhost = $sshhost->{$ENV{'PBPROJ'}}; 1620 my $remdir = $sshdir->{$ENV{'PBPROJ'}}; 1621 if ($cmt =~ /^V[EM]|RM/) { 1622 # In that case our real host is in the xxhost with the OS as key, not project as above 1623 $remhost = pb_distro_get_param($pbos,$sshhost); 1624 } 1625 pb_log(2,"ssh: ".Dumper(($remhost,$sshlogin,$remdir,$sshport,$vtmout,$vepath,$rbsconf))."\n"); 1625 1626 1626 1627 my $mac; 1627 1628 if ($cmt !~ /^VE/) { 1628 $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$ sshmachine";1629 $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$remhost"; 1629 1630 # Overwrite account value if passed as parameter 1630 $mac = "$pbaccount\@$ sshmachine" if (defined $pbaccount);1631 $mac = "$pbaccount\@$remhost" if (defined $pbaccount); 1631 1632 pb_log(2, "DEBUG: pbaccount: $pbaccount => mac: $mac\n") if (defined $pbaccount); 1632 1633 } else { … … 1640 1641 my $bdir; 1641 1642 if (($cmt eq "Sources") || ($cmt =~ /(V[EM]|RM)Script/)) { 1642 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/src";1643 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/src"; 1643 1644 } elsif ($cmt =~ /(V[EM]|RM)(build|test)/) { 1644 $tdir = $ sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/delivery";1645 $bdir = $ sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/build";1645 $tdir = $remdir."/$ENV{'PBPROJ'}/delivery"; 1646 $bdir = $remdir."/$ENV{'PBPROJ'}/build"; 1646 1647 # Remove a potential $ENV{'HOME'} as bdir should be relative to pb's home 1647 1648 $bdir =~ s|\$ENV.+\}/||; 1648 1649 } elsif ($cmt eq "Announce") { 1649 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}";1650 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}"; 1650 1651 } elsif ($cmt eq "Web") { 1651 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}";1652 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}"; 1652 1653 } elsif ($cmt eq "Packages") { 1653 1654 if (($pbos->{'type'} eq "rpm") || ($pbos->{'type'} eq "pkg") || ($pbos->{'type'} eq "hpux") || ($pbos->{'type'} eq "tgz")) { 1654 1655 # put packages under an arch subdir 1655 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}";1656 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"; 1656 1657 } elsif (($pbos->{'type'} eq "deb") || ($pbos->{'type'} eq "ebuild")) { 1657 1658 # No need for an arch subdir 1658 $tdir = "$ sshdir->{$ENV{'PBPROJ'}}/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}";1659 $tdir = "$remdir/$delivery->{$ENV{'PBPROJ'}}/$pbos->{'name'}/$pbos->{'version'}"; 1659 1660 } else { 1660 1661 die "Please teach the dev team where to deliver ($pbos->{'type'} type of packages\n"; … … 1662 1663 1663 1664 my $repodir = $tdir; 1664 $repodir =~ s|^$ sshdir->{$ENV{'PBPROJ'}}/||;1665 $repodir =~ s|^$remdir/||; 1665 1666 1666 1667 my ($pbrepo) = pb_conf_get("pbrepo"); … … 1845 1846 my $tm = undef; 1846 1847 if ($cmt =~ /^(V|R)M/) { 1847 $tm = $vtmout->{$ ENV{'PBPROJ'}};1848 $tm = $vtmout->{$v}; 1848 1849 } 1849 1850 … … 2168 2169 if (($vmtype eq "qemu") || ($vmtype eq "xen") || ($vmtype eq "kvm")) { 2169 2170 my $command = pb_check_req("qemu-img",0); 2170 pb_system("$command create -f qcow2 $vmm $vmsize->{$ ENV{'PBPROJ'}}","Creating the QEMU VM");2171 pb_system("$command create -f qcow2 $vmm $vmsize->{$v}","Creating the QEMU VM"); 2171 2172 } elsif ($vmtype eq "vmware") { 2172 2173 } else { … … 2388 2389 2389 2390 my $vtype = shift; 2390 my $ v= shift;2391 my $pbos = shift; 2391 2392 2392 2393 my ($ntp) = pb_conf_get_if($vtype."ntp"); … … 2395 2396 2396 2397 if (defined $vntp) { 2397 my ($ntpcmd) = pb_ conf_get($vtype."ntpcmd");2398 my ($ntpcmd) = pb_distro_get_param($pbos,pb_conf_get($vtype."ntpcmd")); 2398 2399 my $vntpcmd; 2399 if (defined $ntpcmd->{ $v}) {2400 $vntpcmd = $ntpcmd->{ $v};2400 if (defined $ntpcmd->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) { 2401 $vntpcmd = $ntpcmd->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}; 2401 2402 } elsif (defined $ntpcmd->{$ENV{'PBPROJ'}}) { 2402 2403 $vntpcmd = $ntpcmd->{$ENV{'PBPROJ'}}; … … 2482 2483 } 2483 2484 2484 my $ntpline = pb_date2v($vtype,$v); 2485 # Get distro context 2486 my $pbos = pb_distro_get_context($v); 2487 2488 my $ntpline = pb_date2v($vtype,$pbos); 2485 2489 print SCRIPT "# Time sync\n"; 2486 2490 print SCRIPT "echo 'setting up date with '"; … … 2726 2730 $pm->start($counter) and next if (defined $pbparallel); 2727 2731 2728 # Deal with date sync.2729 my $ntpline = pb_date2v($vtype,$v);2730 2731 2732 # Get distro context 2732 2733 my $pbos = pb_distro_get_context($v); 2733 2734 2735 # Deal with date sync. 2736 my $ntpline = pb_date2v($vtype,$pbos); 2737 2734 2738 # Name of the account to deal with for VM/VE/RM 2735 2739 # Do not use the one passed potentially with -a
Note:
See TracChangeset
for help on using the changeset viewer.