Changeset 2462


Ignore:
Timestamp:
Jan 18, 2020, 6:13:00 PM (6 months ago)
Author:
Bruno Cornec
Message:

Simplify pb_distro_setuprepo

File:
1 edited

Legend:

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

    r2437 r2462  
    648648$h = pb_conf_cache("$ENV{'PBDESTDIR'}/pbrc.yml",$h) if ((defined $ENV{'PBDESTDIR'}) && (-f "$ENV{'PBDESTDIR'}/pbrc.yml"));
    649649
    650 pb_log(3, "INFO: Adding addrepo from config file for $repotype\n");
     650my ($addrepo) = pb_conf_get_in_hash_if($h,"add".$repotype."repo");
     651my $repo = pb_distro_get_param($pbos,$addrepo);
    651652if ($repotype =~ /install/) {
    652653    # Give a probable default if nothing is provided to avoid overloading conf files
    653654    #
    654     my ($addrepo) = pb_conf_get_in_hash_if($h,"addinstallrepo");
    655     my $repo = pb_distro_get_param($pbos,$addrepo);
    656655    if ((not defined $addrepo) || (not defined $repo)) {
    657656        my ($pbrepo) = pb_conf_get_in_hash_if($h,"pbrepo");
     
    673672            $ext = ".sources.list";
    674673        }
    675         $url .= $ext;
    676         return(pb_distro_setuprepo_gen($pbos,$url));
    677     } else {
    678         return(pb_distro_setuprepo_gen($pbos,$repo));
    679     }
    680 } else {
    681     my ($addrepo) = pb_conf_get_in_hash_if($h,"add".$repotype."repo");
    682     my $repo = pb_distro_get_param($pbos,$addrepo);
    683     return(pb_distro_setuprepo_gen($pbos,$repo));
    684 }
     674        $repo = $url.$ext;
     675    }
     676}
     677pb_log(1, "INFO: Adding $repo from config file for $repotype step\n");
     678return(pb_distro_setuprepo_gen($pbos,$repo));
    685679}
    686680
Note: See TracChangeset for help on using the changeset viewer.