Index: trunk/ippScripts/scripts/dist_advancerun.pl
===================================================================
--- trunk/ippScripts/scripts/dist_advancerun.pl	(revision 23838)
+++ trunk/ippScripts/scripts/dist_advancerun.pl	(revision 23861)
@@ -89,5 +89,5 @@
 }
 
-# XXX we should create a file rule for this
+# XXX should we create a file rule for this?
 my $outfile = "$outdir/dbinfo.$stage.$stage_id.mdc";
 
Index: trunk/ippScripts/scripts/dist_make_fileset.pl
===================================================================
--- trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 23838)
+++ trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 23861)
@@ -39,5 +39,5 @@
 
 # Parse the command-line arguments
-my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $prod_id, $product_name, $product_root, $ds_dbhost, $ds_dbname);
+my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $prod_id, $product_name, $ds_dbhost, $ds_dbname);
 my ($dbname, $save_temps, $verbose, $no_update, $logfile);
 
@@ -50,5 +50,4 @@
            'prod_id=s'      => \$prod_id,    # id for the product
            'product_name=s' => \$product_name,  # location of the data store directory for this product
-           'product_root=s' => \$product_root,  # location of the data store directory for this product
            'ds_dbhost=s'    => \$ds_dbhost,  # database host for the datastore database
            'ds_dbname=s'    => \$ds_dbname,  # database name for the datastore database
@@ -61,5 +60,5 @@
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --prod_id --product_root --ds_dbhost --ds_dbname",
+pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --prod_id --ds_dbhost --ds_dbname",
            -exitval => 3) unless
     defined $dist_id and
@@ -70,5 +69,4 @@
     defined $prod_id and
     defined $product_name and
-    defined $product_root and
     defined $ds_dbhost and
     defined $ds_dbname;
@@ -156,6 +154,16 @@
 
 # XXX: disttool -addrcdsfileset
-
-# XXX todo: add rcRun's for the destinations
+{
+    my $command = "$disttool -addfileset -dist_id $dist_id -prod_id $prod_id -name $fileset_name";
+    $command .= " -dbname $dbname" if $dbname;
+
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        run(command => $command, verbose => $verbose);
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to perform $command error_code: $error_code", $dist_id, $prod_id, $error_code);
+    }
+}
+
 
 
@@ -239,4 +247,13 @@
     print STDERR "$msg\n";
 
+    my $command = "$disttool -addfileset -dist_id $dist_id -prod_id $prod_id -fault $fault";
+    $command .= " -dbname $dbname" if $dbname;
+
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        run(command => $command, verbose => $verbose);
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        print STDERR "Unable to perform $command error_code: $error_code\n";
+    }
     exit $fault;
 }
