Changeset 2485 in ProjectBuilder


Ignore:
Timestamp:
Mar 22, 2020, 6:52:44 PM (4 years ago)
Author:
Bruno Cornec
Message:

Adds internal YAML support and improve install2pkg with additional repos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2468 r2485  
    16181618
    16191619    # Get list of packages to test
    1620     # Get content saved in cms2build
    1621     my $ptr = pb_get_pkg();
    1622     @pkgs = @$ptr;
    1623 
     1620    my $pkg = pb_cms_get_pkg($defpkgdir);
     1621    my @pkgs = @$pkg;
     1622    my @ipkgs;
     1623    foreach my $pbpkg (@pkgs) {
     1624        push(@ipkgs,pb_cms_get_real_pkg($pbpkg,$pbos->{'type'}));
     1625    }
    16241626    # Additional potential repo
    16251627    pb_distro_setuprepo($pbos,"install");
    1626     foreach my $pbpkg (@pkgs) {
    1627         # We need to install the package to test, and deps brought with it
    1628         pb_distro_installpkgs($pbos,$pbpkg,"local");
    1629     }
     1628    # We need to install the package to test, and deps brought with it
     1629    pb_distro_installpkgs($pbos,join(' ',@ipkgs));
    16301630}
    16311631
     
    38673867# We should not need in this script more functions than what is provided
    38683868# by Base, Conf and Distribution to avoid problems at exec time.
     3869# # We also need some YAML interpreter
    38693870# They are appended at the end.
    38703871
     
    42364237
    42374238    # Adds pb_distro_get_context and all functions needed from ProjectBuilder::Distribution, Conf and Base
    4238     foreach my $m ("ProjectBuilder/Base.pm","ProjectBuilder/Distribution.pm","ProjectBuilder/Conf.pm") {
     4239    # Also adds the minimal independant YAML code from Tiny::YAML in case no other is around
     4240    foreach my $m ("ProjectBuilder/Base.pm","ProjectBuilder/Distribution.pm","ProjectBuilder/Conf.pm","ProjectBuilder/YAML.pm") {
    42394241        foreach my $d (@INC) {
    42404242            my $f = "$d/$m";
     
    42454247                    next if (/^use Exporter/);
    42464248                    next if (/^use ProjectBuilder::/);
    4247                     next if (/^our /);
     4249                    # Remove lines with our except for the strerr var in YAML
     4250                    next if ((/^our /) && ($_ !~ /errstr/));
    42484251                    print SCRIPT $_;
    42494252                }
Note: See TracChangeset for help on using the changeset viewer.