Changeset 2465 in ProjectBuilder


Ignore:
Timestamp:
Jan 18, 2020, 11:54:17 PM (4 years ago)
Author:
Bruno Cornec
Message:

Fix repo var so it's undef and allow a correct return for pb_distro_setuprepo in all cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r2462 r2465  
    634634
    635635This function sets up potential additional repository to the build/install/test environment
     636If done, it returns forcerepo if a repo was added, if not undef
    636637
    637638=cut
     
    650651my ($addrepo) = pb_conf_get_in_hash_if($h,"add".$repotype."repo");
    651652my $repo = pb_distro_get_param($pbos,$addrepo);
     653# If no repo then set it up as undef so the return value is correct from pb_distro_setuprepo_gen
     654$repo = undef if ($repo eq "");
    652655if ($repotype =~ /install/) {
    653656    # Give a probable default if nothing is provided to avoid overloading conf files
     
    655658    if ((not defined $addrepo) || (not defined $repo)) {
    656659        my ($pbrepo) = pb_conf_get_in_hash_if($h,"pbrepo");
    657         return(undef) if (not defined $pbrepo);
     660        if (not defined $pbrepo) {
     661            cluck("No pbrepo parameter defined in your project configuration file, please fix !");
     662            return(undef);
     663        }
    658664        my $url = "$pbrepo->{$ENV{'PBPROJ'}}";
    659665        my ($testver,$delivery) = pb_conf_get_in_hash_if($h,"testver","delivery");
     
    681687=item B<pb_distro_setuprepo_gen>
    682688
    683 This function sets up in a generic way potential additional repository passed as a param
     689This functionthe sets up in a generic way potential additional repository passed as a param
     690It returns forcerepo if one was added, else undef
    684691
    685692=cut
Note: See TracChangeset for help on using the changeset viewer.