- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/dist_make_fileset.pl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ippScripts/scripts/dist_make_fileset.pl
r25850 r27838 8 8 use Sys::Hostname; 9 9 my $host = hostname(); 10 my $date = `date`; 10 11 print "\n\n"; 11 print "Starting script $0 on $host \n\n";12 print "Starting script $0 on $host at $date\n\n"; 12 13 13 14 use vars qw( $VERSION ); … … 40 41 # Parse the command-line arguments 41 42 my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $dest_id, $product_name, $ds_dbhost, $ds_dbname); 42 my ($label, $d ist_group, $filter);43 my ($label, $data_group, $filter); 43 44 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 44 45 … … 46 47 'dist_id=s' => \$dist_id, # distribution run identifier 47 48 'dist_dir=s' => \$dist_dir, # directory containing dist run outputs 48 'target_id=s' => \$target_id, # 49 'target_id=s' => \$target_id, # 49 50 'stage=s' => \$stage, # raw, chip, camera, fake, warp, stack, or diff 50 51 'stage_id=s' => \$stage_id, # exp_id, chip_id, etc. … … 52 53 'product_name=s' => \$product_name, # location of the data store directory for this product 53 54 'label=s' => \$label, 54 'd ist_group=s' => \$dist_group,55 'filter=s' => \$filter,55 'data_group=s' => \$data_group, 56 'filter=s' => \$filter, 56 57 'ds_dbhost=s' => \$ds_dbhost, # database host for the datastore database 57 58 'ds_dbname=s' => \$ds_dbname, # database name for the datastore database … … 64 65 65 66 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 66 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --d ist_group --filter --dest_id --ds_dbhost --ds_dbname",67 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --data_group --filter --dest_id --ds_dbhost --ds_dbname", 67 68 -exitval => 3) unless 68 69 defined $dist_id and … … 71 72 defined $stage and 72 73 defined $stage_id and 73 defined $d ist_group and74 defined $data_group and 74 75 defined $filter and 75 76 defined $dest_id and … … 94 95 95 96 # make sure that the database info file for this run exists 96 my $dbinfo_file = " dbinfo.$stage.$stage_id.mdc";97 if (! -e "$d ist_dir/$dbinfo_file" ) {97 my $dbinfo_file = "$dist_dir/dbinfo.$stage.$stage_id.mdc"; 98 if (! -e "$dbinfo_file" ) { 98 99 &my_die("dbinfo file for dist run $dbinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR); 99 100 } … … 101 102 102 103 # make sure that the dirinfo file for this run exists 103 my $dirinfo_file = " dirinfo.$stage.$stage_id.mdc";104 if (! -e "$di st_dir/$dirinfo_file" ) {104 my $dirinfo_file = "$dist_dir/dirinfo.$stage.$stage_id.mdc"; 105 if (! -e "$dirinfo_file" ) { 105 106 &my_die("dirinfo file for dist run $dirinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR); 106 107 } … … 142 143 my $md5sum = $component->{md5sum}; 143 144 # name of the file 144 my $ name = $component->{name};145 my $file_name = $component->{name}; 145 146 # component id (class_is or skycell_id) 147 my $comp_dir = $component->{outdir}; 146 148 my $comp_name = $component->{component}; 147 149 148 150 # XXX: if tarfile is not always the right type we need to add a type to distComponent 149 print $listFile "$ name|$size|$md5sum|tgz|$comp_name|\n";151 print $listFile "$comp_dir/$file_name|$size|$md5sum|tgz|$comp_name|\n"; 150 152 } 151 153 … … 156 158 157 159 # the data store will refer to the distribution bundle via symlinks back to distRun.outdir 158 $command .= " --datapath $dist_dir --link"; 160 # $command .= " --datapath $dist_dir --link"; 161 $command .= " --abspath --link"; 159 162 160 163 # set the product specific columns in product list … … 162 165 163 166 $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $prod_col_3"; 164 $command .= " --ps4 $d ist_group --ps5 $filter";167 $command .= " --ps4 $data_group --ps5 $filter"; 165 168 166 169 $command .= " --dbname $ds_dbname --dbhost $ds_dbhost"; … … 207 210 my $dsn = "DBI:mysql:host=$dbserver;database=$dbname"; 208 211 209 my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) 212 my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) 210 213 or die "Cannot connect to database.\n"; 211 214 … … 220 223 my $dbname = shift; 221 224 222 if (($stage eq 'stack') or ($stage eq 'diff') ) {225 if (($stage eq 'stack') or ($stage eq 'diff') or ($stage eq 'SSdiff')) { 223 226 return ""; 224 227 } 225 228 226 229 # 227 # we are a long ways away from the rawExp in the pipeline. Rather than do some 230 # we are a long ways away from the rawExp in the pipeline. Rather than do some 228 231 # very long joins in disttool, we look up the exp_name in the database using DBI 229 232 # 230 233 my $dbh = getDBHandle($ipprc, $dbname); 231 234 232 my $query; 235 my $query; 233 236 234 237 if ($stage eq 'raw') {
Note:
See TracChangeset
for help on using the changeset viewer.
