Ignore:
Timestamp:
Nov 3, 2013, 10:24:55 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • rename function pb_conf_print into pb_distro_conf_print and place it in the right module to handle distribution input for filtering base on it. pb now uses it
File:
1 edited

Legend:

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

    r1747 r1795  
    3333 
    3434our @ISA = qw(Exporter);
    35 our @EXPORT = qw(pb_distro_init pb_distro_conffile pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_get_param pb_distro_get_context pb_distro_to_keylist pb_apply_conf_proxy);
     35our @EXPORT = qw(pb_distro_init pb_distro_conffile pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_get_param pb_distro_get_context pb_distro_to_keylist pb_distro_conf_print pb_apply_conf_proxy);
    3636($VERSION,$REVISION) = pb_version_init();
    3737
     
    709709}
    710710
     711=item B<pb_distro_conf_print>
     712
     713This function prints every configuration parameter in order to help debug stacking issues with conf files. If a VM/VE/RM is given restrict display to this distribution. Ifparameters are passed, restrict again the display to these values only.
     714
     715=cut
     716
     717sub pb_distro_conf_print {
     718
     719my $pbos = shift;
     720my @keys = @_;
     721
     722if ($#keys == -1) {
     723    pb_log(0,"Full pb configuration for project $ENV{'PBPROJ'}\n");
     724    pb_log(0,"================================================\n");
     725}
     726if (defined $ENV{'PBV'}) {
     727    pb_log(0,"Distribution $ENV{'PBV'}\n");
     728    pb_log(0,"========================\n");
     729} else {
     730    pb_log(0,"Local Distribution\n");
     731    pb_log(0,"==================\n");
     732}
     733
     734if ($#keys == -1) {
     735    foreach my $k (pb_conf_get_all()) {
     736        pb_log(0,"$k => ".Dumper(pb_conf_get($k))."\n");
     737    }
     738} else {
     739    foreach my $k (@keys) {
     740        pb_log(0,"$k=".pb_distro_get_param($pbos,pb_conf_get($k))."\n");
     741    }
     742}
     743}
     744
     745
    711746=back
    712747
Note: See TracChangeset for help on using the changeset viewer.