Home
Developer Resources
Technical Articles

QNX Technical Articles

QNX® Momentics® 6.3.0 Patch Professional and Standard Editions Installation Note

Date of this edition: July 23, 2004

Patches are distributed as archives created by the tar utility. Instructions for extracting the files are given on a host-by-host basis below.

This note includes:

Installation procedure

  1. Download the archive to your host environment.
  2. Determine the base directory of your Momentics installation. You can determine this by opening a command shell and using the qconfig command. For example:
    $ qconfig
    QNX Installations
    
    Installation Name: QNX Momentics 6.3.0
    Version: 6.3.0
    Base Directory: /usr/qnx630/
    QNX_HOST: /usr/qnx630/host/qnx6/x86/
    QNX_TARGET: /usr/qnx630/target/qnx6/
      

    Note: the actual values could be different, depending on your host.

  3. Extract the archive you downloaded into the base directory (/usr/qnx630/ in the above example):
    Method 1: Command-line based
    For all hosts, you can open a command shell and use the following commands (replacing base_dir with the path found in step 2, and archive with the full path to the downloaded archive):
    $ cd base_dir
    $ tar -x -f archive
      
    Method 2: GUI based
    Use any GUI-based application that supports the TAR format (e.g. WinZIP under Windows). Ensure that the destination directory is your base directory.

Structure of a patch

The patches are always installed in the following structure:

  base_dir
           |- patches/
	            |- 630-0001/
		              |- files

The files of interest within the 630-number directory are:

version
Includes the patch number and the build information.
manifest
Contains the checksums of the files shipped in the patch (as generated by the cksum utility).
shiplist
A list of the files included in the patch.

Applying the patch

Next, you must determine how to incorporate the patch into your host system. The patch is stored in a directory (or folder) that's separate from your development system. This allows you some flexibility in how to apply the patch.


There will be some instances in which the patch won't be effective unless you apply to to the development system in a particular way. The release notes for these patches will indicate which method you should use.

There are three methods for using a patch:

  • modifying build and configuration files to look in the patch subdirectory
  • creating an override directory tree
  • replacing the development host files with those from the patch.

The first two methods work only for files within the QNX_TARGET subtree. For tools and other host specific files, you must use the third method.

Method 1: Modifying build and configuration files

In the first method, you can use the files in the patch by simply modifying buildfiles to include the full path to the files in the patch subdirectory. This allows you to test the patch before committing to it. It doesn't affect your development host. If you choose to stop using the patch, you just need to change the buildfiles back.

Method 2: Using an override directory tree

You can use a similar approach that involves creating an "override" tree. You can tell the system builder and mkifs utilities to look for binaries in a particular subdirectory before looking in the standard location ($QNX_TARGET).

To do this from the command line:

  1. cd base_dir
  2. pax -rw patches/630-number/target/qnx6/* build/
  3. Add base_dir/build to your system builder paths. For mkifs, you can use the -r option, specifying the same path.

Method 3: Replacing the development host files

The third method replaces the file on your development host with the patched files.


Since this is a destructive procedure, we recommend that you create a backup of the affected files.

To create a backup on any of our hosts (run ksh on Windows):

  1. cd base_dir
  2. pax -w < patches/630-number/shiplist > patches/630-number-backup.tar

    (The name of the backup archive is arbitrary. Replace number with the actual number of your patch.)

To apply the patch:

  1. cd base_dir/patches/630-number
  2. pax -rw < shiplist base_dir

    (Again, replace number with the actual number of your patch.)