NAME

update-pkg - A script which is used to update files within a package held in the data stream format.


SYNOPSIS

update-pkg [-hIT] file [[src dest] ... ]


OPTIONS

Required arguments are:

file
The name of the file which contains a package in the datastream format; the file must only contain a single package. The name of the package is worked out by update-pkg.

Supported options are:

-h
Display usage information.

-I
Do not synchronise the package control scripts in InstallPackage with those in the package itself.

This is automatically used if there is no InstallPackage directory in the current working directory.

-T
Do not run template-control to process any package control script template files.

This is automatically used if there is no InstallPackage directory in the current working directory.

src dest
An updated file for the package. src is copied onto dest which should be relative to the package's root; ie in most cases should be a fully-qualified path. The exception to this is with relocatable packages.

The dest file must already exist within the package, mainly since we'd have to recreate the entire pkgmap file to cope otherwise.


DESCRIPTION

This script allows you to update files within a package stored in a datastream format of the type created by build-pkg. In this format the package is a single file which contains all of the package; this type of package is much easier to deal with since it is just a single file which can be easily moved around and given directly to pkgadd.

However updating files within this type of package is problematical due to it being a single file. Realistically the only way to update the package contents is to:

This script performs this task.

It will automatically update the package control scripts, calling template-control to re-build package control scripts from any template files as required. It will also update files in the distribution as directed by the end user.


EXAMPLE

The following example shows how we could update the package SItestpkg stored in the datastream file SItestpkg.pkg with an updated test.conf file which is available in the current working directory and will end up at /usr/local/etc/test.conf when the package is installed:

  update-pkg SItestpkg.pkg test.conf /usr/local/etc/test.conf


SEE ALSO

build-pkg(1), template-control(1), pkgtrans(1) pkgmap(4)


AUTHOR

Simon Burr <simes@bpfh.net>


LICENSE

Copyright (c) 2003, Simon Burr <simes@bpfh.net> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer. 
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution. 
  * Neither the name of the author nor the names of its contributors may
    be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.