Index: /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 40493)
+++ /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 40494)
@@ -427,5 +427,5 @@
 
     # if not, call _neb_start() and return the new object
-    return $self->_neb_start() or ( carp "Can't start Nebulous" and return undef );
+    (return $self->_neb_start()) or ( carp "Can't start Nebulous" and return undef );
 }
 
Index: /trunk/ippMonitor/raw/ipp.php
===================================================================
--- /trunk/ippMonitor/raw/ipp.php	(revision 40493)
+++ /trunk/ippMonitor/raw/ipp.php	(revision 40494)
@@ -351,5 +351,5 @@
   // loop over the lines in the file and generate lines in the menu
   while ($line = fgetcsv ($file, 1024, "|")) {
-    if (ereg ('^[:blank:]*#', $line[0])) continue;
+    if (preg_match ('^[:blank:]*#', $line[0])) continue;
     if (count($line) < 2) continue;
 
Index: /trunk/psconfig/tagsets/ipp-3.1.dist
===================================================================
--- /trunk/psconfig/tagsets/ipp-3.1.dist	(revision 40494)
+++ /trunk/psconfig/tagsets/ipp-3.1.dist	(revision 40494)
@@ -0,0 +1,87 @@
+# necessary fields:                    
+# |-- tag?
+# ||-- build?
+# |||-- package? 
+# ||||-- update directory from CVS?
+# |||||-- build for developer?
+# |||||
+# |||||  module                 branch name      tag version   
+# ||||| 
+  YYNNY  Ohana                  ipp-2-9          -0
+  NNYYN  ohana.base             ipp-2-9          -0
+  NNYYN  libohana               ipp-2-9          -0
+  NNYYN  libfits                ipp-2-9          -0
+  NNYYN  libautocode            ipp-2-9          -0
+  NNYYN  libdvo                 ipp-2-9          -0
+  NNYYN  libkapa                ipp-2-9          -0
+  NNYYN  libtap.ohana           ipp-2-9          -0
+  NNYYN  addstar                ipp-2-9          -0
+  NNYYN  delstar                ipp-2-9          -0
+  NNYYN  getstar                ipp-2-9          -0
+  NNYYN  ohana.tools            ipp-2-9          -0
+  NNYYN  kapa2                  ipp-2-9          -0
+  NNYYN  relphot                ipp-2-9          -0
+  NNYYN  relastro               ipp-2-9          -0
+  NNYYN  uniphot                ipp-2-9          -0
+  NNYYN  opihi.base             ipp-2-9          -0
+  NNYYN  mana                   ipp-2-9          -0
+  NNYYN  dvo                    ipp-2-9          -0
+  NNYYN  pantasks               ipp-2-9          -0
+  NNYYN  pcontrol               ipp-2-9          -0
+  NNYYN  pclient                ipp-2-9          -0      
+          
+# psLib-based code needs the nebclient library to interact with nebulous
+  YNNYY  Nebulous/nebclient     ipp-2-9          -0
+
+  YYYYY  psLib                  ipp-2-9          -0
+  YYYYY  psModules              ipp-2-9          -0
+  YYYYY  ppStats                ipp-2-9          -0
+  YYYYY  psphot                 ipp-2-9          -0
+  YYYYY  psastro                ipp-2-9          -0
+  YYYYY  ppConfigDump           ipp-2-9          -0
+  YYYYY  ppImage                ipp-2-9          -0
+  YYYYY  ppNoiseMap             ipp-2-9          -0
+  YYYYY  ppNorm                 ipp-2-9          -0
+  YYYYY  ppMerge                ipp-2-9          -0
+  YNNYN  pedestal               ipp-2-9          -0
+  YYYYY  dvoTools               ipp-2-9          -0
+  YYYYY  pswarp                 ipp-2-9          -0
+  YYYYY  ppArith                ipp-2-9          -0
+  YYYYY  ppStack                ipp-2-9          -0
+  YYYYY  ppSub                  ipp-2-9          -0
+  YYYYY  ppSim                  ipp-2-9          -0
+          
+  YNNYY  Nebulous               ipp-2-9          -0
+  YNNYY  Nebulous-Server        ipp-2-9          -0
+  YYYYY  PS-IPP-Metadata-Config ipp-2-9          -0
+  YYYYY  PS-IPP-Config          ipp-2-9          -0     
+          
+  YNNYY  glueforge              ipp-2-9          -0
+  YNNYY  dbconfig               ipp-2-9          -0
+  NNNNY  ippdb.src             
+  YYYNN  ippdb                  ipp-2-9          -0
+  YYYYY  PS-IPP-PStamp          ipp-2-9          -0
+  YYYYY  pstamp                 ipp-2-9          -0
+  YYYYY  ippTools               ipp-2-9          -0
+  YYYYY  ippScripts             ipp-2-9          -0
+  YYYYY  ippTasks               ipp-2-9          -0
+  YYYYY  ippToPsps              ipp-2-9          -0
+          
+  YYYYY  ippconfig              ipp-2-9          -0
+  YNYYN  psconfig               ipp-2-9          -0
+  YNYYN  ippMonitor             ipp-2-9          -0
+  YYYYY  DataStore              ipp-2-9          -0
+  YYYYY  DataStoreServer        ipp-2-9          -0
+
+  YYYYY  ppTranslate            ipp-2-9          -0
+  YYYYY  ppViz                  ipp-2-9          -0
+  YYYYY  ppBackground		ipp-2-9		 -0
+  YYYYY  ppSkycell              ipp-2-9          -0
+
+  YYYYY  extsrc/gpcsw           ipp-2-9          -0
+# YYYYY  magic                  ipp-2-9          -0
+  YYYYY  magic/censorObjects    ipp-2-9          -0
+  YYYYY  magic/remove           ipp-2-9          -0
+  YYYYY  console                ipp-2-9          -0
+
+# there are externally required C libraries and perl modules (see INSTALL)
Index: /trunk/psconfig/tagsets/ipp-3.1.libs
===================================================================
--- /trunk/psconfig/tagsets/ipp-3.1.libs	(revision 40494)
+++ /trunk/psconfig/tagsets/ipp-3.1.libs	(revision 40494)
@@ -0,0 +1,98 @@
+# this file defines C libraries and C headers needed by the ipp, and information on finding them
+
+# directories to search: /lib, /usr/lib, /usr/X11R6/lib, etc.
+# modifications based on the architecture (eg, PATH/lib64, etc)
+# additional locations based on the env variables
+# dlltype to use
+
+# each entry contains:
+#   type : lib / include
+#   name 
+#   alternate names
+#   alternate paths
+#   tarball name
+#   tar directory
+#   force install by default?
+#   configure options
+#   make options
+#   make install options
+
+
+# Build tools
+bin m4                   NONE           NONE   m4-1.4.13.tar.gz         m4-1.4.13        N NONE NONE NONE
+bin autoconf             NONE           NONE   autoconf-2.63.tar.gz     autoconf-2.63    N NONE NONE NONE
+bin automake             NONE           NONE   automake-1.10.tar.gz     automake-1.10    N NONE NONE NONE
+bin libtool              NONE           NONE   libtool-2.2.6-p1.tar.gz  libtool-2.2.6-p1 N NONE NONE NONE
+bin pkg-config           NONE           NONE   pkg-config-0.23.tar.gz   pkg-config-0.23  N NONE NONE NONE
+
+lib libm                 NONE           NONE   NONE                     NONE             N NONE NONE NONE
+lib libX11               NONE           NONE   NONE                     NONE             N NONE NONE NONE
+lib libpthread           NONE           NONE   NONE                     NONE             N NONE NONE NONE
+lib libncurses           curses,termcap NONE   ncurses-5.6.tar.gz       ncurses-5.6      N NONE NONE NONE
+lib libreadline          NONE           NONE   readline-5.2-p15.tar.gz  readline-5.2-p15 Y NONE NONE NONE
+lib libz                 NONE           NONE   zlib-1.2.3.tar.gz        zlib-1.2.3       N --shared NONE NONE
+lib libpng               NONE           NONE   libpng-1.2.15.tar.gz     libpng-1.2.15    N NONE NONE NONE
+lib libjpeg              NONE           jpeg   jpegsrc.v8c.tar.gz       jpeg-8c          N --enable-shared NONE NONE
+lib libcfitsio           NONE           NONE   cfitsio3100-p5.tar.gz    cfitsio3100-p5   N --enable-shared shared,all NONE
+lib libmysqlclient       NONE           mysql  mysql-5.0.51a.tar.gz     mysql-5.0.51a    Y --with-unix-socket-path=/var/run/mysqld/mysqld.sock NONE NONE
+lib libgsl               NONE           NONE   gsl-1.11.tar.gz          gsl-1.11         N NONE NONE NONE
+lib libfftw3f            NONE           NONE   fftw-3.0.1.tar.gz        fftw-3.0.1       N --enable-float,--enable-shared,--disable-fortran NONE NONE
+
+
+inc X11/Xatom.h          NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/Xlib.h           NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/Xresource.h      NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/Xutil.h          NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/cursorfont.h     NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/keysym.h         NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc X11/keysymdef.h      NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc arpa/inet.h          NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc assert.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc complex.h            NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc ctype.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc errno.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc fcntl.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc fftw3.h              NONE           NONE   fftw-3.0.1.tar.gz        fftw-3.0.1       N --enable-float,--enable-shared,--disable-fortran NONE NONE
+inc fitsio.h             NONE           NONE   cfitsio3100-p3.tar.gz   cfitsio3100-p3  N --enable-shared shared NONE
+inc glob.h               NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc gsl/gsl_randist.h    NONE           NONE   gsl-1.11.tar.gz          gsl-1.11         N NONE NONE NONE 
+inc gsl/gsl_rng.h        NONE           NONE   gsl-1.11.tar.gz          gsl-1.11         N NONE NONE NONE 
+inc inttypes.h           NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc jpeglib.h            NONE           jpeg   jpegsrc.v6b-p1.tar.gz    jpeg-6b          N --enable-shared NONE install-lib
+inc limits.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc malloc.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc math.h               NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc memory.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc mysql.h              NONE           mysql  mysql-5.0.51a.tar.gz     mysql-5.0.51a    N NONE NONE NONE
+inc netdb.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc netinet/ip.h         NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc png.h                NONE           NONE   libpng-1.2.15.tar.gz     libpng-1.2.15    N NONE NONE NONE
+inc pthread.h            NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc readline/history.h   NONE           NONE   readline-5.2-p12.tar.gz  readline-5.2-p12 N NONE NONE NONE
+inc readline/readline.h  NONE           NONE   readline-5.2-p12.tar.gz  readline-5.2-p12 N NONE NONE NONE
+inc regex.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc signal.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc stdint.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc stdio.h              NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc stdlib.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc string.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/ipc.h            NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/resource.h       NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/sem.h            NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/socket.h         NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/stat.h           NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/time.h           NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/types.h          NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/uio.h            NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/un.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc sys/wait.h           NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc time.h               NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc unistd.h             NONE           NONE   NONE                     NONE             N NONE NONE NONE 
+inc zlib.h               NONE           NONE   zlib-1.2.3.tar.gz        zlib-1.2.3       N --shared NONE NONE
+
+# xml is currently not used by IPP
+# lib xml2       NONE           NONE   NONE                     NONE             Y NONE NONE NONE
+
+# doxygen is having some unknown build issues on alala
+# bin doxygen            NONE NONE doxygen-1.5.1.src.tar.gz doxygen-1.5.1    N NONE NONE NONE
+
Index: /trunk/psconfig/tagsets/ipp-3.1.perl
===================================================================
--- /trunk/psconfig/tagsets/ipp-3.1.perl	(revision 40494)
+++ /trunk/psconfig/tagsets/ipp-3.1.perl	(revision 40494)
@@ -0,0 +1,106 @@
+# notes:
+# Build.PL/Makefile.PL options are added to the line "perl Build.PL / perl Makefile.PL", a value of NONE is required if no options are desired
+# Build.PL/Makefile.PL responses are supplied via stdin to "perl Build.PL / perl Makefile.PL", a value of NONE is required if no responses are desired
+
+# NN    Name                           Tarball                                  Version        Build.PL/Makefile.PL Build.PL/Makefile.PL responses
+# a Version of 0 is required if no specific version is desired                                 options   responses
+  00    Getopt::Long                   Getopt-Long-2.36.tar.gz                  2.3            NONE      n
+# 00    Module::Build                  Module-Build-0.40.tar.gz                 0.38           NONE      NONE # special comment here
+  00    Module::Build                  Module-Build-0.3601.tar.gz               0.3601         NONE      NONE # special comment here
+  01    ExtUtils::MakeMaker            ExtUtils-MakeMaker-6.54.tar.gz           0              NONE      NONE
+  02a   Attribute::Handlers            Attribute-Handlers-0.87.tar.gz           0.79           NONE      NONE
+# Params::Validate 0.92 breaks with Perl >= 5.14 (and probably earlier) because 'ref' added RegExp as a type
+  02    Params::Validate               Params-Validate-0.96.tar.gz              0.96           NONE      NONE
+# 02    Apache::Test                   Apache-Test-1.29.tar.gz                  1.29           NONE      NONE
+  03a   Class::Singleton               Class-Singleton-1.4.tar.gz               0              NONE      NONE
+  03    DateTime::TimeZone             DateTime-TimeZone-0.59.tar.gz            0              NONE      NONE
+  04    DateTime::Locale               DateTime-Locale-0.33.tar.gz              0              NONE      NONE
+  05    Time::Local                    Time-Local-1.17.tar.gz                   0              NONE      NONE
+  06    DateTime                       DateTime-0.36.tar.gz                     0              NONE      NONE
+  07    MIME::Base64                   MIME-Base64-3.07.tar.gz                  0              NONE      NONE
+  08    IO::Compress::Base             IO-Compress-Base-2.003.tar.gz            0              NONE      NONE
+  09    Compress::Raw::Zlib            Compress-Raw-Zlib-2.003.tar.gz           0              NONE      NONE
+  10    Class::Factory::Util           Class-Factory-Util-1.6.tar.gz            0              NONE      NONE
+  11    DateTime::Format::Strptime     DateTime-Format-Strptime-1.0700.tar.gz   0              NONE      NONE
+  12    Net::Domain::TLD               Net-Domain-TLD-1.65.tar.gz               0              NONE      NONE
+  13    Sub::Uplevel                   Sub-Uplevel-0.14.tar.gz                  0              NONE      NONE
+  14    HTML::Tagset                   HTML-Tagset-3.10.tar.gz                  0              NONE      NONE
+  15    Digest                         Digest-1.15.tar.gz                       0              NONE      NONE
+  16    IO::Compress::Zlib::Extra      IO-Compress-Zlib-2.003.tar.gz            0              NONE      NONE
+  17    version                        version-0.70.tar.gz                      0              NONE      NONE
+  18    Text::Balanced                 Text-Balanced-v2.0.0.tar.gz              0              NONE      NONE
+  19    DateTime::Format::Builder      DateTime-Format-Builder-0.7807.tar.gz    0              NONE      NONE
+  20    ExtUtils::Manifest             ExtUtils-Manifest-1.51.tar.gz            0              NONE      NONE
+  21    URI                            URI-1.35.tar.gz                          1.30           NONE      NONE
+  22    Data::Validate::Domain         Data-Validate-Domain-0.05.tar.gz         0              NONE      NONE
+  23    Test::Exception                Test-Exception-0.24.tar.gz               0              NONE      NONE
+  24    Tree::DAG_Node                 Tree-DAG_Node-1.05.tar.gz                0              NONE      NONE
+  25    Array::Compare                 Array-Compare-1.13.tar.gz                0              NONE      NONE
+  26    HTML::Parser                   HTML-Parser-3.56.tar.gz                  0              NONE      NONE
+  27    Digest::MD5                    Digest-MD5-2.36.tar.gz                   0              NONE      NONE
+  28    Net::FTP                       libnet-1.19.tar.gz                       0              NONE      n
+  29    Compress::Zlib                 Compress-Zlib-2.003.tar.gz               0              NONE      NONE
+  30    Locale::Maketext::Simple       Locale-Maketext-Simple-0.18.tar.gz       0              NONE      NONE
+  31    Parse::RecDescent              Parse-RecDescent-1.94.tar.gz             1.94           NONE      NONE
+  32    Class::Accessor                Class-Accessor-0.30.tar.gz               0.19           NONE      NONE
+  33    DateTime::Format::ISO8601      DateTime-Format-ISO8601-0.06.tar.gz      0.06           NONE      NONE
+  34    CGI                            CGI.pm-3.25.tar.gz                       3              NONE      NONE
+  35    Test::Cmd                      Test-Cmd-1.05.tar.gz                     1.05           NONE      NONE
+  36    Net::HTTPServer                Net-HTTPServer-1.1.1.tar.gz              1.1.1          NONE      NONE
+  37    LWP                            libwww-perl-5.805.tar.gz                 0              NONE      NONE
+  38    Digest::MD5::File              Digest-MD5-File-0.05.tar.gz              0.03           NONE      NONE
+  39    File::Temp                     File-Temp-0.18.tar.gz                    0.16           NONE      NONE
+  40    Data::Validate::URI            Data-Validate-URI-0.01.tar.gz            0.01           NONE      NONE
+  41    Test::Warn                     Test-Warn-0.08.tar.gz                    0              NONE      NONE
+  42    YAML                           YAML-0.62.tar.gz                         0.58           NONE      y
+  43    Module::Load                   Module-Load-0.10.tar.gz                  0              NONE      NONE
+  44    Params::Check                  Params-Check-0.25.tar.gz                 0              NONE      NONE
+  45    Template                       Template-Toolkit-2.16.tar.gz             0              NONE      n,n
+  46    Statistics::Descriptive        Statistics-Descriptive-2.6.tar.gz        2.6            NONE      NONE
+  47    Storable                       Storable-2.15.tar.gz                     0              NONE      NONE
+  48    IO::String                     IO-String-1.08.tar.gz                    0              NONE      NONE
+  49    Date::Parse                    TimeDate-1.16.tar.gz                     0              NONE      NONE
+  50    Digest::SHA1                   Digest-SHA1-2.11.tar.gz                  0              NONE      NONE
+  51    DB_File                        DB_File-1.814.tar.gz                     0              NONE      NONE
+  52    File::NFSLock                  File-NFSLock-1.20.tar.gz                 0              NONE      NONE
+  53    Heap                           Heap-0.71.tar.gz                         0              NONE      NONE
+  54    Module::Load::Conditional      Module-Load-Conditional-0.16.tar.gz      0              NONE      NONE
+  55    IPC::Run                       IPC-Run-0.80.tar.gz                      0              NONE      NONE
+  56    Cache                          Cache-2.04.tar.gz                        0              NONE      NONE
+  57    IPC::Cmd                       IPC-Cmd-0.36.tar.gz                      0.36           NONE      NONE
+  58    SOAP::Lite                     SOAP-Lite-0.69.v1.tar.gz                 0              NONE      yes,yes,no
+  59    Log::Log4perl                  Log-Log4perl-1.10.v1.tar.gz              0              NONE      NONE
+# 60    File::ExtAttr                  File-ExtAttr-1.04.tar.gz                 0              NONE      NONE
+  61    Text::Glob                     Text-Glob-0.08.tar.gz                    0.08           NONE      NONE
+  62    Number::Compare                Number-Compare-0.01.tar.gz               0.01           NONE      NONE
+  63    File::Find::Rule               File-Find-Rule-0.30.tar.gz               0.30           NONE      NONE
+  64    Astro::FITS::CFITSIO           Astro-FITS-CFITSIO-1.05.tar.gz           0              NONE      NONE
+  65    Test::More                     Test-Simple-0.74.tar.gz                  0.49           NONE      NONE
+# 66    Apache::DBI                    Apache-DBI-1.06.tar.gz                   0              NONE      NONE
+# 67    Apache2::SOAP                  Apache2-SOAP-0.72.tar.gz                 0              NONE      NONE
+  68    Test::URI                      Test-URI-1.08.tar.gz                     0              NONE      NONE
+# 69    Sys::Statistics::Linux::DiskUsage Sys-Statistics-Linux-0.26.tar.gz      0              NONE      NONE
+  70    Config::YAML                   Config-YAML-1.42.tar.gz                  0              NONE      NONE
+# 72    File::ExtAttr                  File-ExtAttr-1.07.tar.gz                 0              NONE      NONE
+# version 1.622 updates sv_undef and related to new namespace (PL_*) (needed as of Perl 5.13.XX)
+  73    DBI                            DBI-1.622.tar.gz                         1.622          NONE      NONE
+# version 4.021 updates sv_undef and related to new namespace (PL_*) (needed as of Perl 5.13.XX)
+  71    DBD::mysql                     DBD-mysql-4.021.tar.gz                   4.021          NONE      NONE
+
+# 74    Net::Server::Daemonize         Net-Server-0.97.tar.gz                   0.05           NONE      NONE
+  75    File::Path                      File-Path-2.04.tar.gz                   0              NONE      NONE
+  76    File::Mountpoint                File-Mountpoint-0.01.tar.gz             0.01           NONE      NONE
+  77    Filesys::Df                     Filesys-Df-0.92.tar.gz                  0.92           NONE      NONE
+  78    SQL::Interp                     SQL-Interp-1.06.tar.gz                  0              NONE      NONE
+  79a   Mail::Send                      MailTools-2.04.tar.gz                   0              NONE      NONE
+  79b   Log::Dispatch::Email::MailSend  Log-Dispatch-2.22.tar.gz                0              NONE      NONE
+  80    Abstract::Meta::Class          Abstract-Meta-Class-0.13.tar.gz          0              NONE      NONE
+  81    DBIx::Connection               DBIx-Connection-0.13.tar.gz              0              NONE      NONE
+  82a   Pod::Escapes                   Pod-Escapes-1.04.tar.gz                  0              NONE      NONE
+  82b   Pod::Simple                    Pod-Simple-3.14.tar.gz                   0              NONE      NONE
+  82c   Test::Pod                      Test-Pod-1.40.tar.gz                     0              NONE      NONE
+  82d   XML::NamespaceSupport          XML-NamespaceSupport-1.10.tar.gz         0              --skip    NONE
+  82e   XML::SAX                       XML-SAX-0.96.tar.gz                      0              NONE      Y
+  82f   Simple::SAX::Serializer        Simple-SAX-Serializer-0.05.tar.gz        0              NONE      NONE
+  83    Test::Distribution             Test-Distribution-2.00.tar.gz            0              NONE      NONE
+  84    Test::DBUnit                   Test-DBUnit-0.20.tar.gz                  0.20           NONE      NONE
Index: /trunk/tools/hsc/check_completion.pl
===================================================================
--- /trunk/tools/hsc/check_completion.pl	(revision 40494)
+++ /trunk/tools/hsc/check_completion.pl	(revision 40494)
@@ -0,0 +1,144 @@
+#! /usr/bin/env perl
+
+use Carp;
+use warnings;
+use strict;
+use IPC::Cmd 0.36 qw( can_run run );
+use PS::IPP::Metadata::List qw( parse_md_list );
+use PS::IPP::Config 1.01 qw( :standard );
+use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
+use Pod::Usage qw( pod2usage );
+use DBI;
+
+my $dbname = 'hsc';
+my $dbhost = 'hsc00';
+my $ipprc  = PS::IPP::Config->new();
+my $siteConfig = $ipprc->{_siteConfig};
+
+
+my $db = init_hsc_db();
+
+my $label = shift(@ARGV);
+
+my %results = ();
+my %unexpected_state = ();
+
+## Find counts
+
+my $q = "select count(*),state,data_group,0 FROM chipRun WHERE label = '${label}' GROUP BY state,data_group";
+my $r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("CHIP",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,quality FROM camRun LEFT JOIN camProcessedExp USING(cam_id) WHERE label = '${label}' GROUP BY state,data_group,quality";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("CAM",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,0 FROM fakeRun WHERE label = '${label}' GROUP BY state,data_group";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("FAKE",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,0 FROM warpRun WHERE label = '${label}' GROUP BY state,data_group";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("WARP",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,quality FROM stackRun LEFT JOIN stackSumSkyfile USING(stack_id) WHERE label = '${label}' GROUP BY state,data_group,quality";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("STACK",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,quality FROM staticskyRun LEFT JOIN staticskyResult USING(sky_id) WHERE label = '${label}' GROUP BY state,data_group,quality";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("STATIC",@{ $rr });
+}
+
+$q = "select count(*),state,data_group,quality FROM skycalRun LEFT JOIN skycalResult USING(skycal_id) WHERE label = '${label}' GROUP BY state,data_group,quality";
+$r = $db->selectall_arrayref( $q );
+foreach my $rr (@{ $r }) {
+    add_it("SKYCAL",@{ $rr });
+}
+
+
+## Print results
+print "$label\n";
+printf("%-10s   %-20s  %8s  %8s  %8s\n","stage","data group","state","good","bad");
+print_it("CHIP","chip");
+print_it("CAM","camera");
+print_it("FAKE","fake");
+print_it("WARP","warp");
+print_it("STACK","stack");
+print_it("STATIC","static sky");
+print_it("SKYCAL","sky cal");
+
+
+## Subroutines for clarity
+
+
+sub add_it {
+    my $stage = shift(@_);
+    my $count = shift(@_);
+    my $state = shift(@_);
+    my $data_group = shift(@_);
+    my $quality = shift(@_);
+
+#    print "$stage $count $state $data_group $quality\n";
+
+    if ($quality != 0) { $quality = 1; }
+    if (($state ne 'full')&&($state ne 'new')) { $unexpected_state{$state} = 1; }
+
+    for (my $q = 0; $q <= 1; $q++) {
+	unless (exists( $results{$stage}{$data_group}{$state}{$q} )) {
+	    $results{$stage}{$data_group}{$state}{$q} = 0;
+	}
+    }
+    unless (exists( $results{$stage}{$data_group}{$state}{$quality} )) {
+	$results{$stage}{$data_group}{$state}{$quality} = 0;
+    }
+    $results{$stage}{$data_group}{$state}{$quality} += $count;
+}
+
+sub print_it {
+    my $stage = shift;
+    my $stage_name = shift;
+    my $dg;
+
+    foreach $dg (keys %{ $results{$stage} }) {
+	if (exists($results{$stage}{$dg}{"new"})) {
+	    printf("%-10s   %-20s  %8s  %8d  %8d\n",$stage_name,$dg,"new",$results{$stage}{$dg}{"new"}{0}, $results{$stage}{$dg}{"new"}{1});
+	}
+	if (exists($results{$stage}{$dg}{"full"})) {
+	    printf("%-10s   %-20s  %8s  %8d  %8d\n",$stage_name,$dg,"full",$results{$stage}{$dg}{"full"}{0}, $results{$stage}{$dg}{"full"}{1});
+	}
+	foreach my $ustate (keys %unexpected_state) {
+	    if (exists($results{$stage}{$dg}{$ustate})) {
+		printf("%-10s  %-20s !%8s! %8d  %8d\n",$stage_name,$dg,$ustate,$results{$stage}{$dg}{$ustate}{0},$results{$stage}{$dg}{$ustate}{1});
+	    }
+	}
+    }
+}
+
+sub init_hsc_db {
+    ## change to use the siteConfig setting, while readonly probably do not want to use a readonly replicated DB incase it gets behind
+    my $dbserver = $dbhost;
+    my $dbuser = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBUSER");
+    my $dbpass = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBPASSWORD");
+    die "database configuration not set up" unless defined($dbserver);
+    die "database configuration not set up" unless defined($dbuser);
+    die "database configuration not set up" unless defined($dbpass);
+    use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
+    $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
+                       "mysql_socket=" . DB_SOCKET(),
+                       ${dbuser},${dbpass},
+		       { RaiseError => 1, AutoCommit => 1}
+        ) or die "Unable to connect to database $DBI::errstr\n";
+    return($db);
+}
Index: /trunk/tools/hsc/register_directory.pl
===================================================================
--- /trunk/tools/hsc/register_directory.pl	(revision 40494)
+++ /trunk/tools/hsc/register_directory.pl	(revision 40494)
@@ -0,0 +1,89 @@
+#! /usr/bin/env perl
+
+use Carp;
+use warnings;
+use strict;
+use IPC::Cmd 0.36 qw( can_run run );
+use PS::IPP::Metadata::List qw( parse_md_list );
+use PS::IPP::Config 1.01 qw( :standard );
+use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
+use Pod::Usage qw( pod2usage );
+use DBI;
+
+my $dbname = 'hsc';
+my $dbhost = 'hsc00';
+my $ipprc  = PS::IPP::Config->new();
+my $siteConfig = $ipprc->{_siteConfig};
+
+
+my $db = init_hsc_db();
+my %registered_exp = ();
+
+get_registered_exp_names();
+
+my $directory = shift(@ARGV);
+
+my @fits = <$directory/*.fits>;
+foreach my $f (@fits) {
+    if ($f !~ /00.fits/) { next; }
+
+    my $exp_name = $f;
+    $exp_name =~ s/.fz$//;
+    $exp_name =~ s/.fits$//;
+    $exp_name =~ s%.*/%%;
+
+    my $base = $exp_name;
+    $base =~ s/^HSCA//;
+    $base =~ s/00$//;
+
+    if (($base % 2) != 0) { next; }
+    if (exists($registered_exp{$exp_name})) { next; }
+#    print "# $exp_name\n";
+    my $set1 = "${directory}/HSCA${base}??.fits";
+    $base =~ s/2$/3/;
+    $base =~ s/4$/5/;
+    $base =~ s/6$/7/;
+    $base =~ s/8$/9/;
+    $base =~ s/0$/1/;
+    my $set2 = "${directory}/HSCA${base}??.fits";
+
+    my @check_1 = <"$set1">;
+    my @check_2 = <"$set2">;
+
+    my $count = scalar(@check_1) + scalar(@check_2);
+
+    if ($count == 112) {
+	print "ipp_inject_fileset.pl --workdir ${directory}/regdata --dbname hsc --telescope subaru --camera hsc $set1 $set2\n";
+    }
+    else {
+	print "echo 'exp_name HSCA${base} does not have the correct count of image files ($count).'\n";
+    }
+}
+
+sub get_registered_exp_names {
+    my $query = 'select exp_name from rawExp';
+    my $r = $db->selectall_arrayref( $query );
+    
+    foreach my $rr (@{ $r }) {
+	my ($exp_name) = @{ $rr };
+	$registered_exp{$exp_name} = 1;
+    }
+}
+
+sub init_hsc_db {
+    ## change to use the siteConfig setting, while readonly probably do not want to use a readonly replicated DB incase it gets behind
+    my $dbserver = $dbhost;
+    my $dbuser = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBUSER");
+    my $dbpass = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBPASSWORD");
+    die "database configuration not set up" unless defined($dbserver);
+    die "database configuration not set up" unless defined($dbuser);
+    die "database configuration not set up" unless defined($dbpass);
+    use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
+    $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
+                       "mysql_socket=" . DB_SOCKET(),
+                       ${dbuser},${dbpass},
+{ RaiseError => 1, AutoCommit => 1}
+        ) or die "Unable to connect to database $DBI::errstr\n";
+return($db);
+}
+
