Changeset 15


Ignore:
Timestamp:
Jul 30, 2007, 2:47:27 PM (12 years ago)
Author:
bruno
Message:

Begin to deal with filters

Location:
devel
Files:
6 added
1 deleted
3 edited
1 copied

Legend:

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

    r14 r15  
    1919
    2020use lib qw (lib etc);
    21 use vars qw (%defpkgdir %extpkgdir %version);
     21use vars qw (%defpkgdir %extpkgdir %version @filteredfiles);
    2222use common qw (env_init);
    23 use pb qw (defpkgdir extpkgdir version pb_init);
     23use pb qw (defpkgdir extpkgdir version filteredfiles pb_init);
    2424use distro qw (distro_init);
    2525use cms;
     
    167167            }
    168168
     169            # Get all filters to apply
     170            # They're cumulative from less specific to most specific
     171            # suffix is .pbf
     172            if (-d "$ENV{'PBCONF'}/$p/pbfilter") {
     173                opendir(BDIR,"$ENV{'PBCONF'}/$p/pbfilter" || die "Unable to open dir $ENV{'PBCONF'}/$p/pbfilter: $!");
     174                foreach my $f (readdir(BDIR)) {
     175                    if (-f "$ENV{'PBCONF'}/$p/pbfilter/$dtype.pbf") {
     176
     177                @bfiles = grep { ! /^\./ && -f "$ENV{'PBCONF'}/$p/$dtype/$_" } readdir(BDIR);
     178                closedir(BDIR);
     179            }
     180
    169181        }
    170182        close(D);
  • devel/pb/lib/pb.pm

    r8 r15  
    1111@ISA = qw(Exporter);
    1212# global vars are here
    13 @EXPORT_OK = qw(%defpkgdir %extpkgdir %version &pb_init);
     13@EXPORT_OK = qw(%defpkgdir %extpkgdir %version @filteredfiles &pb_init);
    1414use vars @EXPORT_OK;
    1515use AppConfig qw(ARGCOUNT_ONE ARGCOUNT_HASH ARGCOUNT_LIST EXPAND_ALL);
     
    3030$config->define("extpkgdir" => { ARGCOUNT => ARGCOUNT_HASH });
    3131$config->define("version" => { ARGCOUNT => ARGCOUNT_HASH });
     32$config->define("filteredfiles" => { ARGCOUNT => ARGCOUNT_LIST });
    3233
    3334$config->file($conffile);
     
    5354%version = %$ptr;
    5455
     56# List of files to filter
     57$ptr = $config->get("filteredfiles");
     58@filteredfiles = @$ptr;
     59
    5560}
    56611;
  • devel/pbconf/pb.pb

    r13 r15  
    2323version devel
    2424version stable
     25
     26# List of files on which to apply filters
     27filteredfiles none
  • devel/pbconf/projectbuilder/rpm/pb.spec

    r14 r15  
    77
    88Name:       pb
    9 Version:    VVV
    10 Release:    RRR
     9Version:    PBVER
     10Release:    PBREV
    1111License:    GPL
    12 Group:      GRP
     12Group:      PBGRP
    1313Url:        http://www.mondorescue.org
    14 Source:     SSS
     14Source:     PBSRC
    1515BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    1616BuildRequires: 
Note: See TracChangeset for help on using the changeset viewer.