wpkg

wpkg quick
cheat sheet

wpkg is the actual Windows Packager. The tool used to create, check, install, configure, and remove packages. Although it is called "Windows Packager" it works under Unices as well, although it is very likely that you already have a packager on your system and therefore it probably won't be useful if you use Unix (i.e. Debian has dpkg, Red Hat has rpm, etc.) Actually, wpkg is very heavily based on the Debian Packager, although it does not pretend to be a real clone.

Note
wpkg one letter options -h and -C can be used with a slash instead.
This is to support MS-DOS like options, especially the /h option.

All the different features are discussed throughout this documentation. Here we list all the command line options and how to use them. You probably will be interested by the Control File documentation as well.

First you probably want to look into creating packages with the --build command line option. You can also check the contents of existing Debian packages with commands such as --info and --field. Once you have packages to install, you can look into creating a target database with the --create-admindir then use the --install to install the packages on your system, you can also upgrade already installed packages with --install. To properly manage your environment, you may use --remove to delete installed packages. To get a list of installed packages use the --list command line option.

Download Now!There 8 types of commands:

  1. Audit Installation
  2. Build Packages
  3. Explore Packages
  4. Install Packages
  5. Remove Packages
  6. Repository Management
  7. Pkg-Config Extensions
  8. Other

Each command can be used with a set of options, which are listed along that command documentation. A complete list can be found below the following table, although that table does not define compatibility between options and commands as many options have no effect on most commands. Contrary to commands which can onlly be defined on the command line, options can  be added to your wpkg configuration file and the WPKG_OPTIONS environment variable. Note that options are checked in that order: configuration file, WPKG_OPTIONS variable, then the command line. However, remember that a --no-force-... or a --refuse-... option cannot be cancelled. If defined anywhere, it has priority over the corresponding --force-... option (on purpose.)

Note that wpkg can be used with exactly one command. However, there are a few exceptions where two or three commands may be used together as wpkg implements the different functionality in one go. When these are possible, the additional commands are listed as options. Here is a brief list of different commands that can be used together, note that the order on the command line does not matter, but the order shown here represents the order in which things get executed:

  • --build --create-index --install
  • --auto-remove --purge

 

Group Command Description
AUDIT --audit | -C Audit an installation: check installation validity and the md5sum of each file.
  --md5sums Create a list of files with their md5sum for later audit of those files.
  --md5sums-check Check a list of files against their md5sums as generated on the source system before transfer.
BUILD --build | -b Build a package. See also Configuration Scripts and Processes.
  --build-and-install Build a package and immediately install it.
  --directory-size Compute the size of a directory.
  --increment-build-number Increment your project build number by one.
  --print-build-number Print the project build number.
  --verify Check a package validity.
  --verify-control Verify control files for invalid fields.
  --verify-project Verify that a project is ready for packaging with wpkg.
CONTENTS --contents | -c List the files in a package.
  --control | -e Extract the control archive.
  --copyright Print out copyright information of the specified package.
  --extract | -x Extract data files from a package.
  --field | -f Print the content of a field from the control file.
  --fsys-tarfile Extract the data archive or its content.
  --info | -I Display information about a package.
  --is-installed Check whether a package is installed and exit with 0 or 1 depending on the result.
  --list | -l List installed packages.
  --listfiles | -L List files installed from packages.
  --package-status Print out the status of a package a la --status-fd from dpkg, but without fd support.
  --print-avail | -p Print the control file of an installed package.
  --print-architecture Display the architecture defined in the target database.
  --search | -S Search a file in the installed packages.
  --show | -W Show a package content.
  --status | -s Show the status of an installed package, synonym to --field | -f.
  --vextract | -X Extract files from a package with verbosity.
INSTALL --check-install Check that a set of packages can be installed.
  --configure Configure a package that was previously unpacked.
  --create-admindir Create the administration directory on a target.
  --install | -i Install packages. See also Configuration Scripts and Processes.
  --install-size Compute the total size the installation of a set of packages takes.
  --reconfigure Deconfigure, reset the configuration files and re-configure the package.
  --unpack Unpack a package.
REMOVE --autoremove Automatically remove packages that are not necessary anymore.
  --deconfigure Run the prerm script and remove all the configuration files of a package.
  --purge | -P Purge a package, which means applying a --remove and a --deconfigure. See also Configuration Scripts and Processes.
  --remove | -r Remove (uninstall / repair) a package that was previously installed. See also Configuration Scripts and Processes.
  --rollback Unpack, remove, configure, deconfigure as per a tracking journal.
REPOSITORY --add-sources Add one or more sources to your target system.
  --create-index Create an index for a package repository.
  --list-index-packages List all the packages available in a repository index file.
  --list-sources List existing sources from your target system.
  --remove-sources Remove one or more sources from your target system.
  --update Update a target repository indexes.
  --update-status Information about the last --update run.
  --upgrade Upgrade an installation target with all the out of date packages.
  --upgrade-info Show what can automatically be upgraded. Optionally, show what can be installed and what is up to date.
  --upgrade-urgent Upgrade an installation target with the packages that are out of date and with a high urgency.
PLATFORM --architecture Prints out the architecture with which this version of wpkg1 was compiled.
  --os Prints out the operating system this version of wpkg1 was compiled for.
  --processor Prints out the processor this version of wpkg was compiled for.
  --triplet Prints our the canonicalized operating system, vendor, and processor triplet.
  --vendor Print out the vendor of this version of wpkg.
PKG-CONFIG --atleast-version Check that a package has at last the specified version.
  --atleast-wpkg-version Check that wpkg is at least at a given version.
  --cflags List compilation options such as -I and -fPIC.
  --exact-version Check that a package has a given, specific, version.
  --libs List link options such as -L and -l options.
  --list-all List all the installed packages.
  --max-version Check that a package has a version smaller than or equal to a given version.
  --modversion Display the version of the module.
  --print-variables Print the .pc file and command line defined variables.
  --variable Print the contents of a variable
OTHER --add-hooks Add scripts to run when wpkg does work.
  --canonicalize-version Ensure that a version is valid and canonicalized (as small as possible.)
  --compare-versions Compare two versions to know which one is smaller, larger, or if they are equal.
  --compress Compress one or more files.
  --create-database-lock Lock the database of a target.
  --database-is-locked Check whether the database is locked.
  --decompress Decompress one or more files.
  --help | -h Print out a help screen.
  --license Print out the tool license.
  --list-hooks List currently installed hooks.
  --remove-database-lock Remove a lock created on a target database.
  --remove-hooks Remove scripts previously added with --add-hooks.
  --set-selection Change the selection mode of the specified packages.
  --version Print out version of wpkg.

The following is a complete list of all the commands and options supported by wpkg. Those followed by an ellipsis (...) are options that change the behavior of commands shown in the table above (i.e. wpkg --verbose ...). This list is in alphabetical order. We also offer a list sorted by the command abbreviated letters.

  • 1. a. b. Really this is the version of the library, not wpkg itself.