Friday, December 1, 2017


Posted on 
  • Working on convertdb, a Perl script to read the UK database and convert it into GPDB
  • Finished code to convert users. Using de to get info about a user to populate the GPDB fields
  • Worked out problems with sites and got sites being added to GPDB from the UK database
  • Got adding of PDB_CLEARCASE records preliminarily done


Started coding a Perl script to attempt to convert the UK database to GPDB. Got the Users done then worked out the Site records. The Projects are harder because they contain both site and project as a pair as well as vob/view information. The goal is to get as much of the conversion done as I can as well as flush out issues. Then, at some point, change mkview_linked and mkvob_db to use this new database.

Apparently mkview_linked and mkvob_db utilize this UK database mainly for the purposes of obtaining defaults or a template of information for the creation of views or vobs. There are site-wide defaults, project defaults and finally command line overrides.

GPDB requirements for mkview_link and mkvob_db

I scanned the scripts mkview_link and mkvob_db in order to determine what exactly it needs from GPDB. Here's what I found. Below field names are bold where table names are both bold and italic.


  • Obtains the site name in a table called Sites where the domain field = the domain of the current host
  • Gets all of the project and stream for this site
  • Obtains the following fields from a Projects table where the site = site and the project = "_default":
    • site
    • project
    • vob_host
    • vob_path
    • vob_remote
    • pool_postfix
    • msdos_mode
    • snap_to
    • db_check
    • snap_notify
    • default_view
    • umask
    • group
    • view_host: Used in -host for mkview
    • view_path: Used in -hpath and -gpath for mkview ($view_path/$username/$view.vws)
    • view_remote: If present then the view storage is placed remotely. Note this is Unix specific.
    • msdos_view: If present then a -tmode msdos style view is created.
    • config_spec: Path to a file containing this project's default config spec that is then set as the new view's config spec1
    • notify
    • vob_only
    • cachesize
    • snapshot
    • snapshot_workdir
    • stream
  • It then obtains the same file list from a Projects table where the site = site and the project = the project name. The idea here is that _default is the base and the project record then overrides those defaults.
  • It then does some parameter substitutions for the field values above. Occurances of %USER% will be substituted with the current user, %PROJECT% the current project and strings of the form %SCRIPT()% will run the script defined between the (). The result of that will be the substitution value.


  1. Variable substitution happens on each config spec line too. Occurances of %USER% are replaced with the username (%LCUSER% a lower case username and %UCUSER% an upper case username), %VIEW% with the current view (similar %LCVIEW% and %UCVIEW%), %PROJECT% -> current project and %SITE% -> site (with LC/UC versions too).


  • Obtains the site name in a table called Sites where the domain field = the domain of the current host
  • Obtains all fields from the the Projects table for this site
  • Creates a $project_homes hash for each project/site combination with all fields from the Projects table
  • Creates a @valid_projects array for each project.
  • For each project, substitutes in to each field that is not defined from the site/project/_default record
  • Performs the same substitution as described above on the various fields.

No comments:

Post a Comment

Posted on  November 23, 2005 Continued to help several users with connecting to the new Controller Clearquest Database for Vinh...