Changeset 1795 in ProjectBuilder


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
Location:
devel
Files:
3 edited

Legend:

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

    r1694 r1795  
    399399}
    400400
    401 
    402 =item B<pb_conf_print>
    403 
    404 This function prints every configuration parameter in order to help debug stacking issues with conf files
    405 
    406 =cut
    407 
    408 sub pb_conf_print {
    409 
    410 pb_log(0,"Full pb configuration for project $ENV{'PBPROJ'}\n");
    411 pb_log(0,"====================================\n");
    412 foreach my $k (pb_conf_get_all()) {
    413     pb_log(0,"$k => ".Dumper($h->{$k})."\n");
    414 }
    415 }
    416401=back
    417402
  • 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
  • devel/pb/bin/pb

    r1792 r1795  
    417417=item B<getconf>
    418418
    419 Print the full configuration parameters as found in the various configuration files. help to debug conf issues.
     419Print the full configuration parameters as found in the various configuration files. Help to debug conf issues.
     420Also accepts a parameter to display only this value, and a VM/VE/RM
    420421
    421422=item B<clean>
     
    946947    # Nothing to do - already done in pb_env_init
    947948} elsif ($action =~ /^getconf$/) {
    948     my $pbos = pb_distro_get_context();
    949     pb_conf_print();
     949    my $pbos = pb_distro_get_context($ENV{'PBV'});
     950    pb_log(1,"Arguments to print:".Dumper(@ARGV)."\n");
     951    pb_distro_conf_print($pbos,@ARGV);
    950952} elsif ($action =~ /^clean$/) {
    951953    pb_clean();
Note: See TracChangeset for help on using the changeset viewer.