Changeset 2182 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
Feb 20, 2017, 7:40:38 AM (7 years ago)
Author:
Bruno Cornec
Message:

Solve an issue with dependency optimization

When adding a new repo, we may have some packages which are updates from
already installed packages. In order for them to be updated, we need to
invalidate the optimisation computed on the deps so that all packages are
analyzed again, not just te one not installed yet.
This requires a modification of the interface of the functions
pb_distro_installdeps and pb_distro_getdeps so that they support a new
forcedep parameter which trigger the full analyze vs the optimized one.
This fix is mandatory for python-redfish package build on Mageia 5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2180 r2182  
    16031603
    16041604    # Additional potential repo
    1605     pb_distro_setuprepo($pbos);
     1605    my $forcerepo = pb_distro_setuprepo($pbos);
    16061606    foreach my $pbpkg (@pkgs) {
    16071607        # We need to install the package to test, and deps brought with it
    1608         pb_distro_installdeps(undef,$pbos,$pbpkg);
     1608        pb_distro_installdeps(undef,$pbos,$forcerepo,$pbpkg);
    16091609        pb_system("$ENV{'PBDESTDIR'}/pbtest","Launching test for $pbpkg","verbose");
    16101610    }
     
    16191619
    16201620    # If needed we may add repository to the build env
    1621     pb_distro_setuprepo($pbos);
     1621    my $forcerepo = pb_distro_setuprepo($pbos);
     1622    pb_log(1,"Forcing full package install with forcerepo\n") if (defined $forcerepo);
    16221623
    16231624    # Get list of packages to build
     
    16621663        foreach my $f (@buildfiles) {
    16631664            if ($f =~ /$ftype/) {
    1664                 pb_distro_installdeps($f,$pbos);
     1665                pb_distro_installdeps($f,$pbos,$forcerepo);
    16651666            }
    16661667        }
     
    20702071    print KEEP "$made\n";
    20712072    close(KEEP);
    2072     pb_distro_installdeps(undef,$pbos,$ret) if ($do_install);
     2073    pb_distro_installdeps(undef,$pbos,undef,$ret) if ($do_install);
    20732074}
    20742075
     
    39133914   
    39143915my $pkgdep = pb_distro_get_param($pbos,$ospkgdep);
    3915 pb_distro_installdeps(undef,$pbos,pb_distro_only_deps_needed($pbos,join(' ',split(/,/,$pkgdep))));
     3916pb_distro_installdeps(undef,$pbos,undef,pb_distro_only_deps_needed($pbos,join(' ',split(/,/,$pkgdep))));
    39163917
    39173918EOF
     
    39723973        print SCRIPT << 'EOF';
    39733974my $pkgforpb = pb_distro_get_param($pbos,pb_conf_get_if("ospkg"));
    3974 pb_distro_setuposrepo($pbos);
    3975 pb_distro_installdeps(undef,$pbos,pb_distro_only_deps_needed($pbos,join(' ',split(/,/,$pkgforpb))));
     3975my $forcerepo = pb_distro_setuposrepo($pbos);
     3976pb_log(1,"Forcing full package install with forcerepo\n") if (defined $forcerepo);
     3977pb_distro_installdeps(undef,$pbos,$forcerepo,pb_distro_only_deps_needed($pbos,join(' ',split(/,/,$pkgforpb))));
    39763978EOF
    39773979    } else {
Note: See TracChangeset for help on using the changeset viewer.