Debian Planet










Welcome to Debian Planet

Search

Apt-get into it.
Main Menu

  • Home

  • Topics

  • Web Links

  • Your Account

  • Submit News

  • Stats

  • Top 10

  • Debian

    These are important Debian sites one should not be without!

  • Official Debian site

  • Package search

  • Mailing list archives

  • Bug reports

  • Debian on CD

  • Unofficial woody CD ISOs

  • Unofficial APT sources

  • Developers' Corner

    Other great Debian news sources:

  • Debian Weekly News

  • Kernel Cousin Debian

    (Debian mailing lists digested)
  • Community Groups

    Need help? You're not alone on this planet.

  • debianHELP

    (User support site)

  • Debian International

  • DebianForum.de

    (Deutsch)

  • EsDebian

    (español)

  • DebianWorld

    (français)

  • MaximumDebian

    (Italiano)

  • DebianUsers

    (Korean)

  • Debian-BR

    (Português)

  • IRC

    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.debian.org.

    Many of the Debian Planet staff live there so pop by and say hello.

    Wanna write?

    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you've written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    Sponsorship

    DP is sponsored by Xinit Systems and kieser.net.

    Domains paid for and hosted by uklinux.net.

    Buy your Debian merchandise at DebianShop.com.

    Who's Online

    There are currently, 46 guest(s) and 2 member(s) that are online.

    You are Anonymous user. You can register for free by clicking here.

      
    HOWTOs: The Debian Sandwich Part II
    Posted on Monday, April 02 @ 21:36:20 BST

    Debian
    Welcome to the second part of The Debian Sandwich, I received so much glory and praise from the first part so I decided I thought I ought to write a sequel.

    Before we delve into the mysteries of dpkg which this article is mostly concerned with let me lead you through the reasoning behind The Debian Sandwich. This metaphor relates to the fact that in the Debian package system there are three layers, your highest level (which is the top slice of bread) is your favourite apt front end dselect/gnome-apt/kapt ( does this exist or am I imaging it?), the next layer in the sandwich is apt itself, this is the filling (Bacon, Lettuce and Tomato for me 🙂 ), the front end programs control apt. You can of course run apt yourself and many people do (including me!), apt is itself a wrapper for the lowest layer, dpkg, which is the bottom layer in the sandwich . Dpkg is a complex beast of which we are only going to scratch the surface of, it is unlikely that you will need to use dpkg much, it is mainly used to build new packages and those from source through its variants dpkg-deb, dpkg-buildpackage, dpkg-source (there are lots, typing dpkg and then using the auto complete feature of your shell (if it has one) will reveal them).

    We will just cover the basic and most useful features, of dpkg. If you want more in depth knowledge the man page provides an excellent source of information. I strongly recommend that you use apt as a wrapper for dpkg wherever possible. The only times you will not be able to use apt is if you have a stand alone deb file that you wish to install or if you want to remove a specific package without affecting dependencies etc through the use of --force-thing.

    The basic options available for dpkg are:

    dpkg -i | --install filename(s) - this command simply installs the given package file. Note: it takes the FULL path to the file not just the package name. If the package is already installed it upgrades it to this version

    dpkg -r | --remove packagename(s) - this command removes a package leaving any configuration files. Note: it takes the package name NOT the path to the file.

    dpkg -P | --purge packagename(s) - this command does the same as above but removes the configuration files also

    dpkg -l | --list pattern - find packages matching pattern e.g. dpkg -l *gnome*

    dpkg -s | --status packagename(s) - check the status of specified packages, see the man page for a full list but these include, installed, half-configured etc.

    dpkg -C | --audit - this is a very useful it checks all the installed packages on your system to look for broken packages, useful one to run in a crontab perhaps

    dpkg -L | --listfiles packagename(s) - list files belonging to specified package(s)

    dpkg -S | --search pattern - list the package(s) owning files that match pattern

    Thats about all the important commands there is just one option I think is important to mention and that is --force-thing, this allows you to override certain aspects of the packaging system for the command you are executing, for a full list of possible options do --force-help, but the only one i've ever used is --force-depends which turns all dependency problems into warnings.

    I hope you enjoyed this sequel, if you have any comments why not make them below

    Rob

     
    Related Links

  • Debian Homepage
  • SPI Inc.
  • More about Debian
  • News by rob

    Most read story about Debian:
    Xpdf and PDF copy-control

    Last news about Debian:

    Printer Friendly Page  Send this Story to a Friend
  • "HOWTOs: The Debian Sandwich Part II" | Login/Create Account | 4 comments
    Threshold


    The comments are owned by the poster. We aren't responsible for their content.

    Re: The Debian Sandwich Part II (Score: 1)
    by Anonymous on Thursday, April 19 @ 05:48:03 BST

    Hello, I'm new to Debian, so know rpm pretty well and am new to dpkg. I must say that although rpm options are a bit more verbose, they do follow a pretty regular pattern, so things like querying a package or the package that owns a file for anything just involves changing the last option .. I don't know, maybe it will come in time with dpkg with a bit more familliarity. There do seem like much fewer options which leads to my question:

    Do you know what the dpkg equivalent is to -qip which displays the information page within an rpm package?

    Also, what does -C audit against? does dpkg keep md5's for each file on the system or something like that?

    [ Reply ]


    Re: The Debian Sandwich Part II (Score: 1)
    by Terence on Tuesday, August 14 @ 05:28:38 BST
    (User Info)

    I know a lot of people say dselect and apt are the nifty front-ends that everybody will warm up to, but I learned dpkg before I grasped apt-get (I still haven't found a use for dselect - that ponderous scrolling list of packages). I think you have shown that dpkg isn't all that hard. A newbie can quickly learn dpkg -i, dpkg -r, and dpkg -l.

    Apt-get however does have the advantage of handling huge sets of dependencies and it keeps the packages pretty orderly and clean. After figuring out apt-get, I haven't gone back to dpkg.

    [ Reply ]


    Based on: PHP-Nuke

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2000 by Debian Planet

    You can syndicate our news using the file backend.php.