Changeset 1666 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Oct 27, 2012, 10:04:45 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Adds support for a 2ins target for all buildpkg call (example: sbx2pkg2ins) which adds the final installation of packages at the end
Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1661 r1666  
    203203
    204204sbx2build + build2pkg
     205
     206=item B<sbx2pkg2ins>
     207
     208sbx2pkg + final install of packages
    205209
    206210=item B<build2ssh>
     
    781785pb_log(0,"Action: $action\n");
    782786
     787my $do_install = undef;
     788# Possibility to add a 2ins to some commands to launch automatic installation
     789$do_install = 1 if ($action =~ /2ins$/);
     790
    783791# Act depending on action
    784792if ($action =~ /^cms2build$/) {
     
    786794} elsif ($action =~ /^sbx2build$/) {
    787795    pb_cms2build("SandBox");
    788 } elsif ($action =~ /^build2pkg$/) {
    789     pb_build2pkg();
    790 } elsif ($action =~ /^cms2pkg$/) {
     796} elsif ($action =~ /^build2pkg/) {
     797    pb_build2pkg($do_install);
     798} elsif ($action =~ /^cms2pkg/) {
    791799    pb_cms2build("CMS");
    792     pb_build2pkg();
    793 } elsif ($action =~ /^sbx2pkg$/) {
     800    pb_build2pkg($do_install);
     801} elsif ($action =~ /^sbx2pkg/) {
    794802    pb_cms2build("SandBox");
    795     pb_build2pkg();
     803    pb_build2pkg($do_install);
    796804} elsif ($action =~ /^build2ssh$/) {
    797805    pb_build2ssh();
     
    14061414sub pb_build2pkg {
    14071415
     1416    my $do_install = shift;
     1417
    14081418    pb_log(0,"INFO: ------ Starting to build package ------\n");
    14091419    # Get the running distro to build on
     
    17671777    my ($chkcmd,$chkopt) = pb_distro_get_param($pbos,pb_conf_get_if("oschkcmd","oschkopt"));
    17681778
     1779    my $ret = "";
    17691780    # Packages check if needed
    17701781    if ($pbos->{'type'} eq "rpm") {
     
    17841795        pb_log(0,"SRPM packages generated: $srpms\n");
    17851796        pb_log(0,"RPM packages generated: $rpms\n");
     1797        $ret = $rpms;
    17861798    } elsif ($pbos->{'type'} eq "deb") {
    17871799        my $made2 = "";
     
    17941806        }
    17951807        pb_log(0,"deb packages generated: $made2\n");
     1808        $ret = $made2;
    17961809    } else {
    17971810        pb_log(0,"No check done for $pbos->{'type'} yet\n");
    17981811        pb_log(0,"Packages generated: $made\n");
     1812        $ret = $made;
    17991813    }
    18001814
     
    18041818    print KEEP "$made\n";
    18051819    close(KEEP);
     1820    pb_distro_installdeps(undef,$pbos,$ret) if ($do_install);
    18061821}
    18071822
  • devel/pb/t/pbtest

    r1619 r1666  
    354354d=mageia-2-i386
    355355sudopbtest "qemu-img create -f qcow2 $PBTEST/vm/$d.qemu 72G"
    356 sudopbtest "sudo qemu-kvm -m 1024 -kernel /pub/mageia/distrib/2/i586/isolinux/alt0/vmlinuz -initrd /pub/mageia/distrib/2/i586/isolinux/alt0/all.rdz -append "ramdisk_size=128000 root=/dev/ram3 kickstart=http://192.168.8.55/pub/ks/guerrero/ks.pl automatic=method:http,server:192.168.8.55,directory:/pub/mageia/distrib/2/i586,network:dhcp" -drive file=$PBTEST/vm/$d.qemu,if=virtio,media=disk -redir tcp:2200:10.0.2.15:22"
     356sudopbtest "sudo qemu-kvm -m 1024 -kernel /pub/mageia/distrib/2/i586/isolinux/alt0/vmlinuz -initrd /pub/mageia/distrib/2/i586/isolinux/alt0/all.rdz -append "ramdisk_size=128000 root=/dev/ram3 kickstart=http://192.168.8.55/pub/ks/guerrero/ks.pl automatic=method:http,server:192.168.8.55,directory:/pub/mageia/distrib/2/i586,network:dhcp" -drive file=$PBTEST/vm/$d.qemu,if=virtio,media=disk -boot once=n -redir tcp:2200:10.0.2.15:22"
    357357sudopbtest "pb -p pb -r devel -m $d sbx2setupvm"
    358358sudopbtest "pb -p pb -m $d snapvm"
Note: See TracChangeset for help on using the changeset viewer.