Changes between Version 2 and Version 3 of WhatIsAPackage

10/17/12 18:53:28 (9 years ago)



  • WhatIsAPackage

    v2 v3  
    33A 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. 
     6== Source Packages == 
     8Source 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. 
     10You 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. 
     12== Binary Packages 
    514Binary 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: 
    4352- Suggests is even more lax than Recommends, and is generally not used by any package managers. 
    4453- 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. 
     55 == Package Managers == 
     57Binary 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.   
     59Another 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.