[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Determining a .deb's intended Debian Version



[Christopher Crammond]
> Suppose you have a repository stuffed full of binary packages, in
> this case Debian Packages.  If you were unlucky enough to have them
> in a rather un-organized fashion, I was just wondering if the package
> file itself would provide said information to allow me to write a
> program to sort them out.

The tool you have is the Depends line in each package.  You can
retrieve this information using 'dpkg --info'.

Specifically, over half of Debian packages declare a dependency on
'libc6', usually greater than or equal to a particular version.  The
required libc6 version corresponds to distributions like so:

  libc6 (>= 2.1.something)         Debian 2.2 (potato)
  libc6 (>= 2.2.5-something)       Debian 3.0 (woody)
  libc6 (>= 2.3.2.ds1-something)   Debian 3.1 (sarge)
  libc6 (>= 2.3.5-something)       Debian etch or sid

Packages that don't depend on libc6 often depend on something else that
will give away the game, like perl.  Potato shipped with perl 5.005 or
so, woody with perl 5.6.1, sarge with perl 5.8.4, and etch currently
has perl 5.8.7.  So some perl packages will include versioned
dependencies that provide a clue.

If a package contains no dependencies that tell you what version of
Debian they're intended for, then more than likely it does not matter.
Note also that the way these dependencies are declared, usually a lower
version limit is provided but no upper limit, which means exactly what
you think it means: many if not most woody packages will install and
run correctly on sarge, and so forth.

Attachment: signature.asc
Description: Digital signature


Reply to: