From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- .../html/package-management-package-utilities.html | 330 +++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 slackbook/html/package-management-package-utilities.html (limited to 'slackbook/html/package-management-package-utilities.html') diff --git a/slackbook/html/package-management-package-utilities.html b/slackbook/html/package-management-package-utilities.html new file mode 100644 index 000000000..0179a5a81 --- /dev/null +++ b/slackbook/html/package-management-package-utilities.html @@ -0,0 +1,330 @@ + + + + +Package Utilities + + + + + + + + + + + +
+

18.2 Package Utilities

+ +

There are four main utilities for package management. They perform installation, +removal, and upgrades of packages.

+ +
+

18.2.1 pkgtool

+ +

pkgtool(8) is a menu-driven program that allows installation +and removal of packages. The main menu is shown in Figure 18-1.

+ +
+

Figure 18-1. Pkgtool's main menu.

+ +

+
+ +

Installation is offered from the current directory, another directory, or from floppy +disks. Simply select the installation method you want and pkgtool will search that +location for valid packages to install.

+ +

You may also view a list of installed packages, as shown in Figure 18-2.

+ +
+

Figure 18-2. Pkgtool view mode

+ +

+
+ +

If you want to remove packages, select the remove option and you will be presented +with a checklist of all the installed packages. Flag the ones you want to remove and +select OK. pkgtool will remove them.

+ +

Some users prefer this utility to the command line utilities. However, it should be +noted that the command line utilities offer many more options. Also, the ability to +upgrade packages is only offered through the command line utilities.

+
+ +
+

18.2.2 installpkg

+ +

installpkg(8) handles installation of new packages on the +system. The syntax is as follows:

+ + + + + +
+
+# installpkg option package_name
+
+
+ +

Three options are provided for installpkg. Only one option +can be used at a time.

+ +
+

Table 18-1. installpkg Options

+ + +++ + + + + + + + + + + + + + + + + + + + + + + +
OptionEffects
-mPerforms a makepkg operation on the current directory.
-warnShows what would happen if you installed the specified package. This is useful for +production systems so you can see exactly what would happen before installing +something.
-rRecursively install all packages in the current directory and down. The package name +can use wildcards, which would be used as the search mask when recursively +installing.
+
+ +

If you pass the ROOT environment variable before installpkg, that path will be used for the root directory. This is +useful for setting up new drives for your root directory. They will typically be mounted +to /mnt or something other than /.

+ +

The installed package database entry is stored in /var/log/packages. The entry is really just a plain text file, one +for each package. If the package has a postinstallation script, it is written to /var/log/scripts/.

+ +

You may specify several packages or use wildcards for the package name. Be advised +that installpkg will not tell you if you are overwriting an +installed package. It will simply install right on top of the old one. If you want to +ensure that old files from the previous package are safely removed, use upgradepkg.

+
+ +
+

18.2.3 removepkg

+ +

removepkg(8) handles removing installed packages from the +system. The syntax is as follows:

+ + + + + +
+
+# removepkg option package_name
+
+
+ +

Four options are provided for removepkg. Only one option may +be used at a time.

+ +
+

Table 18-2. removepkg Options

+ + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionEffects
-copyThe package is copied to the preserved packages directory. This creates a tree of the +original package without removing it.
-keepSaves temporary files created during the removal. Really only useful for debugging +purposes.
-preserveThe package is removed, but copied to the preserved packages directory at the same +time.
-warnShows what would happen if you removed the package.
+
+ +

If you pass the ROOT environment variable before removepkg, that path will be used for the root directory. This is +useful for setting up new drives for your root directory. They will typically be mounted +to /mnt or something other than /.

+ +

removepkg looks at the other installed packages and only +removes files unique to the package you specify. It will also scan the postinstallation +script for the specified package and remove any symbolic links that were created by +it.

+ +

During the removal process, a status report is displayed. After the removal, the +package database entry is moved to /var/log/removed_packages +and the postinstallation script is moved to /var/log/removed_scripts.

+ +

Just as with installpkg, you can specify several packages or +use wildcards for the package name.

+
+ +
+

18.2.4 upgradepkg

+ +

upgradepkg(8) will upgrade an installed Slackware package. +The syntax is as follows:

+ + + + + +
+
+# upgradepkg package_name
+
+
+ +

or

+ + + + + +
+
+# upgradepkg old_package_name%new_package_name
+
+
+ +

upgradepkg works by first installing the new package and then +removing the old package so that old files are no longer around on the system. If the +upgraded package name has changed, use the percent sign syntax to specify the old package +(the one that is installed) and the new package (the one you are upgrading it to).

+ +

If you pass the ROOT environment variable before upgradepkg, that path will be used for the root directory. This is +useful for setting up new drives for your root directory. They will typically be mounted +to /mnt or something other than /.

+ +

upgradepkg is not flawless. You should always back up your +configuration files. If they get removed or overwritten, you'll want a copy of the +originals for any needed repair work.

+ +

Just as with installpkg and removepkg, you can specify several packages or use wildcards for the +package name.

+
+ +
+

18.2.5 rpm2tgz/rpm2targz

+ +

The Red Hat Package Manager is a popular packaging system available today. Many +software distributors are offering their products in RPM format. Since this is not our +native format, we do not recommend people rely on them. However, some things are only +available as an RPM (even the source).

+ +

We provide a program that will convert RPM packages to our native .tgz format. This will allow you to extract the package (perhaps +with explodepkg) to a temporary directory and examine its +contents.

+ +

The rpm2tgz program will create a Slackware package with a +.tgz extension, while rpm2targz +creates an archive with a .tar.gz extension.

+
+
+ + + + + -- cgit v1.2.3