Changeset 319 in ProjectBuilder
- Timestamp:
- Feb 10, 2008, 7:31:25 PM (16 years ago)
- Location:
- devel/pb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r318 r319 189 189 190 190 $pbrev = $ENV{'PBREVISION'}; 191 pb_log( 2,"\n");192 pb_log( 2,"Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n");191 pb_log(0,"\n"); 192 pb_log(0,"Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n"); 193 193 die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'}); 194 194 # Clean up dest if necessary. The export will recreate it … … 206 206 207 207 # If it isn't a flat CMS, then we have the choice to export subdir 208 $dir = "$uri/$dir" if ($ENV{'PBREVISION'} ne "flat");209 pb_cms_export($ scheme,"$dir",$dest);208 #$dir = "$uri/$dir" if ($ENV{'PBREVISION'} ne "flat"); 209 pb_cms_export($uri,"$dir",$dest); 210 210 211 211 # Get project info on authors and log file -
devel/pb/lib/ProjectBuilder/Base.pm
r318 r319 67 67 pb_log(0,"WARNING: using $proj as default project as none has been specified\n"); 68 68 pb_log(0," Please either create a pbconf reference for project $proj in $ENV{'PBETC'}\n"); 69 pb_log(0," or call pb with the -p project option if you want to use another project\n"); 69 pb_log(0," or call pb with the -p project option or use the env var PBPROJ\n"); 70 pb_log(0," if you want to use another project\n"); 70 71 } 71 72 } … … 93 94 # --------------------------------------------- ---------- 94 95 # * * | | | | * * 95 # 1.0 dev pbconf ... build delivery PBCONF 1.0 devPBDEVROOT96 # | | PBDESTDIR 97 # ------ pbrc PBBUILDDIR 98 # | | 99 # 1.0 dev PBROOT96 # 1.0 dev pbconf ... build delivery PBCONF dev tag PBDEVROOT 97 # | | PBDESTDIR | 98 # ------ pbrc PBBUILDDIR ------- 99 # | | | | 100 # dev tag PBROOT 1.0 1.1 100 101 # | 102 # ------- 103 # | | 104 # 1.0 1.1 105 # | 101 106 # ---------------------------------- 102 107 # | | | | … … 307 312 #pbproj $ENV{'PBPROJ'} = ftp://ftp.$ENV{'PBPROJ'}.org/src/$ENV{'PBPROJ'}-devel.tar.gz 308 313 #pbproj $ENV{'PBPROJ'} = file:///src/$ENV{'PBPROJ'}-devel.tar.gz 314 #pbproj $ENV{'PBPROJ'} = dir:///src/$ENV{'PBPROJ'}-devel 309 315 310 316 # … … 375 381 print CONF << "EOF"; 376 382 # Hash of default package/package directory 377 #defpkgdir pkg1 = pkg1dir383 #defpkgdir $pp = dir-$pp 378 384 EOF 379 385 } … … 381 387 print CONF << "EOF"; 382 388 # Hash of additional package/package directory 383 #extpkgdir minor-pkg = minor-pkg-dir389 #extpkgdir minor-pkg = dir-minor-pkg 384 390 385 391 # List of files per pkg on which to apply filters … … 818 824 my $cmt=shift || $cmd; 819 825 820 pb_log( 2,"$cmt... ");826 pb_log(0,"$cmt... "); 821 827 #system("$cmd 2>&1 > $ENV{'PBTMP'}/system.log"); 822 828 system($cmd); 823 829 if ($? == -1) { 824 pb_log( 2,"failed to execute ($cmd) : $!\n");830 pb_log(0,"failed to execute ($cmd) : $!\n"); 825 831 pb_display_file("$ENV{'PBTMP'}/system.log"); 826 832 } elsif ($? & 127) { 827 pb_log( 2, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n");833 pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n"); 828 834 pb_display_file("$ENV{'PBTMP'}/system.log"); 829 835 } elsif ($? == 0) { 830 pb_log( 2,"OK\n");836 pb_log(0,"OK\n"); 831 837 } else { 832 pb_log( 2, "child ($cmd) exited with value ".($? >> 8)."\n");838 pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n"); 833 839 pb_display_file("$ENV{'PBTMP'}/system.log"); 834 840 } … … 1034 1040 sub pb_cms_export { 1035 1041 1036 my $ scheme= shift;1042 my $uri = shift; 1037 1043 my $source = shift; 1038 1044 my $destdir = shift; … … 1041 1047 1042 1048 my @date = pb_get_date(); 1049 # If it's not flat, then we have a real uri as source 1050 my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri); 1043 1051 1044 1052 if ($scheme eq "svn") { … … 1049 1057 } 1050 1058 pb_system("svn export $source $tmp","Exporting $source from SVN to $tmp"); 1051 } elsif ($scheme eq " flat") {1059 } elsif ($scheme eq "dir") { 1052 1060 if (-d $source) { 1053 1061 $tmp = $destdir; … … 1056 1064 } 1057 1065 pb_system("cp -a $source $tmp","Exporting $source from DIR to $tmp"); 1066 } elsif (($scheme eq "http") || ($scheme eq "ftp")) { 1067 my $f = basename($path); 1068 unlink "$ENV{'PBTMP'}/$f"; 1069 if (-x "/usr/bin/wget") { 1070 pb_system("/usr/bin/wget -nv -O $ENV{'PBTMP'}/$f $uri","Downloading $uri with wget to $ENV{'PBTMP'}/$f\n"); 1071 } elsif (-x "/usr/bin/curl") { 1072 pb_system("/usr/bin/curl $uri -o $ENV{'PBTMP'}/$f","Downloading $uri with curl to $ENV{'PBTMP'}/$f\n"); 1073 } else { 1074 die "Unable to download $uri.\nNo wget/curl available, please install one of those"; 1075 } 1076 pb_cms_export("file://$ENV{'PBTMP'}/$f",$source,$destdir); 1077 } elsif ($scheme eq "file") { 1078 use File::MimeInfo; 1079 my $mm = mimetype($path); 1080 pb_log(2,"mimetype: $mm\n"); 1081 1082 if ($mm =~ /\/x-bzip-compressed-tar$/) { 1083 # tar+bzip2 1084 } elsif ($mm =~ /\/x-lzma-compressed-tar$/) { 1085 # tar+lzma 1086 } elsif ($mm =~ /\/x-compressed-tar$/) { 1087 # tar+gzip 1088 } elsif ($mm =~ /\/x-tar$/) { 1089 # tar 1090 } elsif ($mm =~ /\/zip$/) { 1091 # zip 1092 } 1093 pb_log(0,"scheme file not implemented yet\n"); 1058 1094 } elsif ($scheme eq "cvs") { 1059 1095 my $dir=dirname($destdir);
Note:
See TracChangeset
for help on using the changeset viewer.