prt-get - User ManualTable of Contents1. Introduction1.1. Document Version1.2. Description1.3. Recommendation1.4. General usage1.5. Wildcards in prt-get1.6. Remember the test mode2. Configuration2.1. Some words about prt-get's internals2.2. Configuration file2.3. The prtdir Option2.3.1. Example2.4. The cachefile Option2.5. The logging Options2.6. The readme Option2.6.1. Idea2.6.2. Configuration in prt-get.conf2.6.3. Example2.7. The depfile Option2.8. Execution of install scripts2.8.1. Example2.9. Order of directories2.10. Listing a directory multiple times2.10.1. Example2.11. Example prt-get.conf file2.12. Changing the configuration settings via the command line2.13. Checking your configuration values3. Installation, Removal and Update of Packages3.1. Install3.1.1. Arguments3.1.2. Options3.1.3. Examples3.2. Update3.2.1. Arguments3.2.2. Options3.2.3. Examples3.3. Group install3.3.1. Options3.3.2. Example3.4. Install with dependencies3.5. Removing packages3.6. Update all outdated packages3.6.1. Options3.7. Locking packages3.7.1. Options3.8. Pre- and Post-Install scripts4. Searching and getting information about ports4.1. List available ports4.1.1. Options:4.1.2. Example4.2. Formatted list of available ports4.2.1. Format specifiers:4.2.2. Example4.3. List installed port4.3.1. Options:4.4. Searching the port names4.4.1. Options:4.4.2. Example:4.5. Description Search4.5.1. Options:4.5.2. Example:4.6. Searching the files of the ports4.6.1. Example:4.7. Information4.7.1. Example:4.7.2. Output (yours might differ):4.8. Printing the path4.8.1. Examples:4.9. Printing the README file of a port4.9.1. Example:5. Dependencies5.1. Dependencies as supported by prt-get5.2. Listing dependencies5.2.1. Output of prt-get depends kdenetwork5.2.2. Output of prt-get quickdep kdenetwork5.3. Listing dependent packages5.3.1. Notes:5.3.2. Options:5.3.3. Output of prt-get dependent5.4. Tree representation of dependencies5.4.1. Options:5.4.2. Output of prt-get deptree6. Package status information6.1. Differences between installation and the ports tree6.1.1. Arguments for prt-get diff6.1.2. Options for prt-get diff6.2. Check if a package is installed6.3. Check the version of an installed package6.4. List duplicate packages in ports tree7. Using a log file7.1. Description8. Using a cache file8.1. Using a cache file8.2. Creating a cache file8.3. Creating a cache file8.3.1. Example:8.4. Using the cache explicitely: prt-cache8.4.1. Example:9. Advanced usage9.1. Installation using dependencies9.2. Update all outdated ports9.3. Package clusters9.4. Accessing files of a port9.5. Sharing a Ports Tree9.5.1. Example:9.6. All your base...9.7. Recompile all installed ports10. Copyright and licensing10.1. Copyright10.2. Licenseprt-get - User Manualprt-get - User Manualprt-get - User ManualAn advanced package management tool for CRUX
Author
Johannes
Winkelmann,
jw@tks6.netTable of Contents1. Introduction 1.1. Document Version 1.2. Description 1.3. Recommendation 1.4. General usage 1.5. Wildcards in prt-get 1.6. Remember the test mode 2. Configuration 2.1. Some words about prt-get's internals 2.2. Configuration file 2.3. The prtdir Option 2.4. The cachefile Option 2.5. The logging Options 2.6. The readme Option 2.7. The depfile Option 2.8. Execution of install scripts 2.9. Order of directories 2.10. Listing a directory multiple times 2.11. Example prt-get.conf file 2.12. Changing the configuration settings via the command line 2.13. Checking your configuration values 3. Installation, Removal and Update of Packages 3.1. Install 3.2. Update 3.3. Group install 3.4. Install with dependencies 3.5. Removing packages 3.6. Update all outdated packages 3.7. Locking packages 3.8. Pre- and Post-Install scripts 4. Searching and getting information about ports 4.1. List available ports 4.2. Formatted list of available ports 4.3. List installed port 4.4. Searching the port names 4.5. Description Search 4.6. Searching the files of the ports 4.7. Information 4.8. Printing the path 4.9. Printing the README file of a port 5. Dependencies 5.1. Dependencies as supported by prt-get 5.2. Listing dependencies 5.3. Listing dependent packages 5.4. Tree representation of dependencies 6. Package status information 6.1. Differences between installation and the ports tree 6.2. Check if a package is installed 6.3. Check the version of an installed package 6.4. List duplicate packages in ports tree 7. Using a log file 7.1. Description 8. Using a cache file 8.1. Using a cache file 8.2. Creating a cache file 8.3. Creating a cache file 8.4. Using the cache explicitely: prt-cache 9. Advanced usage 9.1. Installation using dependencies 9.2. Update all outdated ports 9.3. Package clusters 9.4. Accessing files of a port 9.5. Sharing a Ports Tree 9.6. All your base... 9.7. Recompile all installed ports 10. Copyright and licensing 10.1. Copyright 10.2. License 1. Introduction1. Introduction1.1. Document Version1.1. Document Version
$Date: 2003/01/13 22:39:22 $
1.2. Description1.2. Description
prt-get is a package management tool for
CRUX
[1]
[1]
CRUX is a lightweight Linux Distribution, check
http://crux.nu for more information which
provides additional functionality to crux' package management
system. It works with the local ports tree and is therefore
fully compatible with ports(8) and
pkgmk(8)/pkgadd(8). It offers the following
features:
•abstract port installation/update from file system•install/update a list of packages with one command•list dependencies for a list of packages•show information about ports•search within the ports•advanced logging for builds
What prt-get basically does is installing and
upgrading packages, using pkgmk and pkgadd. Additionally, you
don't have be in the port's directory to call
prt-get. prt-get will search for the
respective port itself in a list of directories specified in
/etc/prt-get.conf. This allows you to just install
or update a package, without caring where it actually is located
on your file system.
prt-get also offers some features like searching ports by
name, showing information about ports (without installing them
of course) and can list the dependencies listed in the
Pkgfile, and provide a complete dependency list for a
port. Note that dependencies are no requirement for crux
packages and therefore not always accurate
prt-get has a test mode so you can see what effect an
install/update operation would have. Use the --test
switch for this (see Section 1.6, “Remember the test mode” [] to learn
more about the test mode).
1.3. Recommendation1.3. Recommendation
prt-get is a front end to pkgmk and
pkgadd and requires a basic knowledge how these tools
work. Make sure you understand the package management of CRUX and
the tools used before you start using
prt-get.
1.4. General usage1.4. General usage
The general usage for prt-get is similar to
cvs:
the first argument passed is always a so called command. In
general the syntax looks like this:
prt-get command arguments
1.5. Wildcards in prt-get1.5. Wildcards in prt-get
Some commands support wildcard patterns as arguments; in
general, those which produce a listing have this option.
•list, e.g.list kde*•listinst, e.g. listinst ???•diff, e.g. diff a*•printf, e.g. printf "%n\n"
--filter=gnome*
The shell tries to expand the wildcards, therefore you might run
into problems sometimes: if you have files in your current
working directory matching the pattern, the shell will expand it
and prt-get will recieve the expanded filename as argument
instead of the pattern. In this case, you can simply escape the
command (e.g. list kde\*) or pass in
surrounded by quotation marks (list "kde*").
1.6. Remember the test mode1.6. Remember the test mode
prt-get has a test mode where no actual installation
or update happens, but only the respective output shown. It can be
used by adding the --test switch to a command, e.g.
prt-get install gimp --test You might want
to try out the commands you see here, and you can use the test
mode to make sure you don't do anything before you're perfectly
sure what a command means.
2. Configuration2. Configuration2.1. Some words about prt-get's internals2.1. Some words about prt-get's internals
One of prt-get's targets is to abstract the ports
from the file system. This means that a user doesn't have to care
about the actual directory where a port is located and she/he can
just install a package (e.g. mutt) instead of a port
(e.g. /usr/ports/contrib/mutt). The key used to
identify is only the name of the port (Sidenote:
prt-get uses the name of the port's directory as name
for the port, not the name variable from the
Pkgfile
[2]
[2]
If you don't know what
Pkgfiles are, please refer to the CRUX user
manual. They should always be the same.)
Still the main idea behind this
abstraction is not comfort, but simplicity for dependency
specification. Having any information about the file system in
Pkgfiles (even if it's only "base", "opt", "clc/stable" or
"clc/unstable") is something to avoid by any means.
This concept requires the user to specify the base directories
where prt-get looks for ports. This can be done in the
configuration file /etc/prt-get.conf.
2.2. Configuration file2.2. Configuration file
The configuration file /etc/prt-get.conf has a very
simple format. You specify one option per line. All options are
key-value pairs, separated by whitespace.
2.3. The prtdir Option2.3. The prtdir Option
Specify here where to look for ports. These directories are
not the port directories itself, but the directory where
prt-get looks for ports; that means you don't specify
/usr/ports/contrib/mutt (a port directory), but
/usr/ports/contrib. prt-get will
then search for all ports in this directory. Recursive
directories are not supported.
2.3.1. Example
prtdir /path/to/ports
The more, the user can restrict which ports should be used per
directory by providing a list of those after the directories
path. The allowed packages have to be separated by a comma
character (","), the list itself must be separated with a
colon char (":") from the path. The format of a line
therefore looks like this:
prtdir /path/to/ports:port1, port2, ...
2.4. The cachefile Option2.4. The cachefile Option
By default, the cache file is
/var/lib/pkg/prt-get.conf. You can change this by
using cachefile /path/file. This
is especially nice if you want to place it on an NFS share without
exporting the complete /var/lib/pkg tree.
2.5. The logging Options2.5. The logging Options
prt-get has a mechanism to log the output of builds into a file. There
are three options in the config file:
•writelog
(enabled|disabled): enable logging
[3]
[3]
see also the --log
switch
•
logmode (append|overwrite): always append to the logfile
•
logfile filename: write log to
filename. filename can
contain the %n character, which is replaced by the port
name, and the %p character, which is replaced with the
path to the port's directory.
Example: one log file for each port
logmode overwrite
logfile /tmp/log/%n.log
or: one directory per port, same file name for all:
logmode overwrite
logfile /tmp/log/%n/build.log
or: one log file for everything.
logmode append
logfile /tmp/log/build.log
or: log file in port directory:
logmode append
logfile %p/build.log
2.6. The readme Option2.6. The readme Option2.6.1. Idea
From version 0.3.5, prt-get checks for a file called
README in the port's directory. Those files
usually contain important information and it is highly recommended
to read them. prt-get has a command to print out
readme files which is called prt-get readme (who
would have guessed). The information is also shown when you issue
prt-get info.
Now often when you install software you don't want to check for a
readme file, that's why prt-get offers a way to
automatically display this information for install and update
actions. There are two ways of displaying this information: either
integrated in the result of an install/update operation.
$ prt-get update gtk2
...
-- Packages updated
gtk2 (README)
prt-get: updated successfully
or appended as a separate block:
$ prt-get update gtk2
...
-- Packages updated
gtk2
-- updated packages with README files:
gtk2
prt-get: updated successfully
2.6.2. Configuration in prt-get.conf
To configure this, there is a configuration option called
readme which can be set to compact (integrated
in the result), verbose (separate block) or
disabled (don't show information about readme files).
2.6.3. Example
compact readme information
###
# prt-get.conf
...
readme compact
2.7. The depfile Option2.7. The depfile Option
Starting with prt-get 0.5.11, the depfile option is not used anymore; a dependency list is shipped by default.
2.8. Execution of install scripts2.8. Execution of install scripts