dpkg - a medium-level package manager for Debian GNU/Linux
It should not be used by package maintainers wishing to understand how dpkg will install their packages. The descriptions of what dpkg does when installing and removing packages are particularly inadequate. For detailed information about this, please refer to the Package Management System topic under debian-faq in the GNU Info system. For information about creating Debian packages, see the Debian Package Management Tools topic in the same place.
dpkg can be also be used as a front-end to dpkg-deb. The following are dpkg-deb actions, and if they are encountered, dpkg just runs dpkg-deb with the parameters given to it:
-b, --build, -c, --contents, -I, --info, -f, --field, -e, --control, -x, --extract, -X, --vextract, and --fsys-tarfile.Please refer to dpkg-deb(8) for information about these actions.
Installation consists of the following steps:
1. Extract the control files of the new package.
2. If another version of the same package was installed before
the new installation, execute prerm script of the old package.
3. Run preinst script, if provided by the package.
4. Unpack the new files, and at the same time back up the old
files, so that if something goes wrong, they can be restored.
5. If another version of the same package was installed before
the new installation, execute the postrm script of the old
package. Note that this script is executed after the preinst
script of the new package, because new files are written at the same
time old files are removed.
6. Configure the package. See --configure for detailed information about how this is done.
Configuring consists of the following steps:
1. Unpack the configuration files, and at the same time back up
the old configuration files, so that they can be restored if
something goes wrong.
2. Run postinst script, if provided by the package.
Removing of a package consists of the following steps:
1. Run prerm script
2. Remove the installed files
3. Run postrm script
dpkg -b | --build directory [filename] Build a Debian GNU/Linux package. dpkg -c | --contents filename List contents of Debian GNU/Linux package. dpkg -e | --control filename [directory] Extract control-information from a package. dpkg -x | --extract filename directory Extract the files contained by package. dpkg -f | --field filename [control-field] ... Display control field(s) of a package. dpkg --fsys-tarfile filename Display the filesystem tar-file contained by a Debian package. dpkg -I | --info filename [control-file] Show information about a package. dpkg -X | --vextract filename directory Extract and display the filenames contained by a package.
number description
1 Generally helpful progress information
2 Invocation and status of maintainer scripts
10 Output for each file processed
100 Lots of output for each file processed
20 Output for each configuration file
200 Lots of output for each configuration file
40 Dependencies and conflicts
400 Lots of dependencies/conflicts output
1000 Lots of drivel about e.g. the dpkg/info dir
2000 Insane amounts of drivel
Force or refuse (no-force and refuse mean the same thing) to do some things. things is a comma separated list of things specified below. --force-help displays a message describing them. Things marked with (*) are forced by default.
Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system.
auto-select(*): Select packages to install them, and deselect packages to remove them.
downgrade(*): Install a package, even if newer version of it is already installed.
configure-any: Configure also any unpacked but unconfigured packages on which the current package depends.
hold: Process packages even when marked "hold".
remove-reinstreq: Remove a package, even if it's broken and marked to require reinstallation. This may, for example, cause parts of the package to remain on the system, which will then be forgotten by dpkg.
remove-essential: Remove, even if the package is considered essential. Essential packages contain mostly very basic Unix commands. Removing them might cause the whole system to stop working, so use with caution.
depends: Turn all dependency problems into warnings.
depends-version: Don't care about versions when checking dependencies.
conflicts: Install, even if it conflicts with another package. This is dangerous, for it will usually cause overwriting of some files.
confnew: If a conffile has been modified always install the new version without prompting.
confold: If a conffile has been modified always keep the old version without prompting.
confdef: If a conffile has been modified always choose the default action. If --force-confnew or --force-confold have also been given always default. If there is no default then we use the old or new version, depending on the option given.
overwrite(*): Overwrite one package's file with another's file.
overwrite-dir Overwrite one package's directory with another's file.
overwrite-diverted: Overwrite a diverted file with an undiverted version.
architecture: Process even packages with the wrong architecture.
bad-path: PATH is missing important programs, so problems are likely.
not-root: Try to (de)install things even when not root.
Be sure to give --no-act before the action-parameter, or you might end up with undesirable results. (e.g. dpkg --purge foo --no-act will first purge package foo and then try to purge package --no-act, even though you probably expected it to actually do nothing)
To see the entries in /var/lib/dpkg/available on two packages:
dpkg --print-avail elvis vim | less
To search the listing of packages yourself:
less /var/lib/dpkg/available
To remove an installed elvis package:
dpkg -r elvis
To install a package, you first need to find it in an archive or
CDROM. The "available" file shows that the vim package is in section
"editors":
cd /cdrom/hamm/hamm/binary/editors
dpkg -i vim_4.5-3.deb
To make a local copy of the package selection states:
dpkg --get-selections >myselections
You might transfer this file to another computer, and install it there
with:
dpkg --set-selections <myselections
Ordinarily, you will find that dselect(8) provides a more
convenient way to modify the package selection states.
--no-act usually gives less information than might be helpful.
Contributions to /usr/share/doc/dpkg/THANKS for the list of people who have contribud to dpkg .
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |