Changeset 18 in ProjectBuilder for devel/pb/lib
- Timestamp:
- Jul 31, 2007, 12:50:36 AM (17 years ago)
- Location:
- devel/pb/lib
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/changelog.pm
r17 r18 17 17 my $pbtag = shift; 18 18 my $dsuf = shift; 19 my $path = shift; 19 20 my $OUTPUT = shift; 20 21 … … 26 27 return("\n") if ((not (defined $dtype)) || ($dtype eq "") || 27 28 (not (defined $pkg)) || ($pkg eq "") || 29 (not (defined $pbtag)) || ($pbtag eq "") || 30 (not (defined $dsuf)) || ($dsuf eq "") || 31 (not (defined $path)) || ($path eq "") || 28 32 (not (defined $OUTPUT)) || ($OUTPUT eq "")); 29 33 30 my $chglog = "$ENV{'PBROOT'}/$p kg/ChangeLog";34 my $chglog = "$ENV{'PBROOT'}/$path/ChangeLog"; 31 35 if (! -f $chglog) { 32 print "Unable to find a ChangeLog filefor $pkg\n";36 print "Unable to find the ChangeLog file ($chglog) for $pkg\n"; 33 37 return("\n"); 34 38 } … … 72 76 $ver2 = "$ver$dsuf"; 73 77 } 74 print $OUTPUT "* $ndate Bruno Cornec <bruno\@mondorescue.org>$ver2\n";78 print $OUTPUT "* $ndate $confparam{'packager'} $ver2\n"; 75 79 print $OUTPUT "- Updated to $ver\n"; 76 80 } … … 95 99 96 100 if ($dtype eq "deb") { 97 print $OUTPUT " -- Bruno Cornec <bruno\@mondorescue.org>$n2date\n\n";101 print $OUTPUT " -- $confparam{'packager'} $n2date\n\n"; 98 102 print $OUTPUT "\n"; 99 103 } -
devel/pb/lib/cms.pm
r9 r18 5 5 # $Id$ 6 6 # 7 8 require Exporter;9 @ISA = qw(Exporter);10 @EXPORT = qw(get_toolhome);11 7 12 8 use strict; -
devel/pb/lib/common.pm
r17 r18 5 5 # $Id$ 6 6 # 7 require Exporter;8 @ISA = qw(Exporter);9 @EXPORT = qw(env_init);10 7 8 use strict; 11 9 use lib qw (lib); 12 10 use pb qw (pb_init); 13 use strict;14 11 use File::Basename; 15 12 use File::Path; 16 13 use File::Temp qw /tempdir/; 17 use vars qw (%defpkgdir %extpkgdir %version %param);18 14 use Data::Dumper; 19 15 … … 43 39 # Check content 44 40 # 45 if (not defined $ param{"pbroot"}) {46 die " param pbroot doesn't exist in $ENV{'PBETC'}/$proj.pb";41 if (not defined $confparam{"pbroot"}) { 42 die "confparam pbroot doesn't exist in $ENV{'PBETC'}/$proj.pb"; 47 43 } else { 48 $ENV{'PBROOT'} = $ param{"pbroot"};44 $ENV{'PBROOT'} = $confparam{"pbroot"}; 49 45 } 50 if (defined $ param{"cvsroot"}) {51 $ENV{'CVSROOT'} = $ param{"cvsroot"};46 if (defined $confparam{"cvsroot"}) { 47 $ENV{'CVSROOT'} = $confparam{"cvsroot"}; 52 48 } 53 49 -
devel/pb/lib/distro.pm
r13 r18 5 5 # $Id$ 6 6 # 7 8 require Exporter;9 @ISA = qw(Exporter);10 @EXPORT = qw(distro_init distro_get);11 7 12 8 use strict; -
devel/pb/lib/pb.pm
r17 r18 1 1 #!/usr/bin/perl -w 2 2 # 3 # Project Builder configuration file 3 # Project Builder configuration file handler 4 4 # For project pb ;-) 5 5 # … … 7 7 # 8 8 use strict; 9 use Exporter();10 use vars qw(@ISA @EXPORT_OK);11 @ISA = qw(Exporter);12 # global vars are here13 @EXPORT_OK = qw(%defpkgdir %extpkgdir %version %param %filteredfiles &pb_init);14 use vars @EXPORT_OK;15 9 use AppConfig qw(ARGCOUNT_HASH); 16 10 … … 33 27 # Root of the project to build 34 28 # needs at least 2 levels of dir as in the upper 35 # other dirs will be created and used 36 $ptr = $config->get("param"); 37 %param = %$ptr; 29 # other dirs will be created and used 38 30 39 # List of pkg to build by default 31 # main parameter hash (mandatory) 32 $ptr = $config->get("confparam") || die "Unable to find confparam in $conffile"; 33 %confparam = %$ptr; 34 35 # List of pkg to build by default (mandatory) 40 36 $ptr = $config->get("defpkgdir") || die "Unable to find defpkgdir in $conffile"; 41 37 %defpkgdir = %$ptr; 42 38 43 # List of additional pkg to build when all is called 39 # List of additional pkg to build when all is called (optional) 44 40 $ptr = $config->get("extpkgdir"); 45 %extpkgdir = %$ptr; 41 if (not defined $ptr) { 42 %extpkgdir = (); 43 } else { 44 %extpkgdir = %$ptr; 45 } 46 46 47 # Valid version names 47 # Valid version names (optional) 48 48 $ptr = $config->get("version"); 49 %version = %$ptr; 49 if (not defined $ptr) { 50 %version = (); 51 } else { 52 %version = %$ptr; 53 } 50 54 51 # List of files to filter 55 # List of files to filter (optional) 52 56 $ptr = $config->get("filteredfiles"); 53 %filteredfiles = %$ptr; 57 if (not defined $ptr) { 58 %filteredfiles = (); 59 } else { 60 %filteredfiles = %$ptr; 61 } 54 62 55 63 }
Note:
See TracChangeset
for help on using the changeset viewer.