Changes between Version 2 and Version 3 of WhatIsAPackage
- Timestamp:
- 10/17/12 18:53:28 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WhatIsAPackage
v2 v3 2 2 3 3 A Debian package consists of both its contents (generally, the files and directories it includes) and some metadata. There are both source and binary packages, which we will discuss in detail. 4 5 6 == Source Packages == 7 8 Source packages consist of a `.dsc` file, as well as a `.tar.gz` file, and optionally a `.diff.gz` file. The .dsc file contains some metadata and checksums for the other two files. The `.tar.gz` file contains the actual software itself. If the software was modified from its original form by Debian or Ubuntu, those changes are represented in the `.diff.gz` file. 9 10 You can obtain the source package for any binary package with the `apt-get source packagename` command (e.g. `apt-get source xterm`). APT will download the source package, unpack it into the current directory, and apply the changes in the .diff.gz. The `dpkg-source` command can do this manually. 11 12 == Binary Packages 4 13 5 14 Binary packages have the file extension `.deb`, and are managed with the `dpkg` command. Given a .deb file, `dpkg -c` will list the files in the package, and `dpkg -I` will display the package's "control" information. This is the metadata mentioned above. Let's look at an example: … … 43 52 - Suggests is even more lax than Recommends, and is generally not used by any package managers. 44 53 - Description: is a description of the package. The first line should be a summary, and subsequent lines should be a full-text description, indented by one space. 54 55 == Package Managers == 56 57 Binary packages can be installed with the `dpkg -i` command, but this is generally unfamiliar to many novice Debian users. This is because most package transactions on modern Debian workstations take place with a package manager. The most well known one is the Advanced Package Tool (APT). Installation of packages is performed with the "apt-get" command, e.g. `apt-get install xterm`. Package managers take care of installing dependencies for you and streamline the package installation process. 58 59 Another common package manager is `aptitude`. Throughout the Debathena documentation, you may see both `aptitude` and `apt-get` used interchangeable. While they have similar features, their syntax is different. Consult the manual pages for both commands for more information. 60