Changeset 19


Ignore:
Timestamp:
Jul 31, 2007, 2:07:14 AM (11 years ago)
Author:
bruno
Message:

Lots of debug traces. Looking for a bug in AppConfig? where for hash a key of 1 is added without defined value.
Except that, weems to work just fine (content to be checked)

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb.pl

    r18 r19  
    2222
    2323use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles);
     24%extpkgdir = ();
     25%filteredfiles = ();
    2426use lib qw (lib);
    2527use common qw (env_init);
     
    218220                            }
    219221                        });
    220             print "ffiles: ".Dumper(\@ffiles)."\n";
     222            my $ptr;
    221223            if (@ffiles) {
     224                print "ffiles: ".Dumper(\@ffiles)."\n";
    222225                $config->file(@ffiles);
    223                 my $ptr = $config->get("filter");
     226                $ptr = $config->get("filter");
    224227                print "f:".Dumper($ptr)."\n";
    225 
    226                 # Apply now all the filters on all the files concerned
    227                 # All files are relative to PBROOT
    228                 # destination dir depends on the type of file
    229                 if (defined $ptr) {
    230                     foreach my $f (values %bfiles) {
    231                         filter_file($f,$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$pkg,$dtype,$dsuf);
    232                     }
    233                     foreach my $f (keys %filteredfiles) {
    234                         filter_file($f,$ptr,"$dest/$f",$pkg,$dtype,$dsuf);
    235                     }
     228            } else {
     229                $ptr = { };
     230            }
     231
     232            # Apply now all the filters on all the files concerned
     233            # All files are relative to PBROOT
     234            # destination dir depends on the type of file
     235            if (defined $ptr) {
     236                foreach my $f (values %bfiles) {
     237                    filter_file($f,$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$pkg,$dtype,$dsuf);
     238                }
     239                foreach my $f (keys %filteredfiles) {
     240                    filter_file($f,$ptr,"$dest/$f",$pkg,$dtype,$dsuf);
    236241                }
    237242            }
  • devel/pb/lib/pb.pm

    r18 r19  
    88use strict;
    99use AppConfig qw(ARGCOUNT_HASH);
     10use Data::Dumper;
    1011
    1112sub pb_init {
     
    1718                            # Auto Create variables mentioned in Conf file
    1819                            CREATE => 1,
    19                             DEBUG => 0,
     20                            DEBUG => 1,
    2021                            GLOBAL => {
    2122                                # Each conf item is a hash
    22                                 ARGCOUNT => AppConfig::ARGCOUNT_HASH
     23                                DEFAULT => { },
     24                                ARGCOUNT => AppConfig::ARGCOUNT_HASH,
    2325                            }
    2426                        });
     
    3234$ptr = $config->get("confparam") || die "Unable to find confparam in $conffile";
    3335%confparam = %$ptr;
     36print "confparam: ".Dumper($ptr)."\n";
    3437
    3538# List of pkg to build by default (mandatory)
    3639$ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile";
    3740%defpkgdir = %$ptr;
     41print "defpkgdir: ".Dumper($ptr)."\n";
    3842
    3943# List of additional pkg to build when all is called (optional)
    4044$ptr = $config->get("extpkgdir");
     45print "extpkgdir1: ".Dumper($ptr)."\n";
    4146if (not defined $ptr) {
    4247    %extpkgdir = ();
     
    4449    %extpkgdir = %$ptr;
    4550}
     51print "extpkgdir: ".Dumper(\%extpkgdir)."\n";
    4652
    4753# Valid version names (optional)
     
    5258    %version = %$ptr;
    5359}
     60print "version: ".Dumper(\%version)."\n";
    5461
    5562# List of files to filter (optional)
     
    6067    %filteredfiles = %$ptr;
    6168}
     69print "filteredfiles: ".Dumper(\%filteredfiles)."\n";
    6270
    6371}
Note: See TracChangeset for help on using the changeset viewer.