Get update type of .deb file

Tom H tomh0665 at gmail.com
Wed Apr 3 18:24:08 UTC 2013


On Wed, Apr 3, 2013 at 12:28 PM, Big bang theory
<baglio.giuseppe at yahoo.com> wrote:
> Tom H-4 wrote
>>
>> It's either held locally in "/var/lib/apt/lists/*_Packages" or in a
>> repository; for the UK:
>>
>> http://uk.archive.ubuntu.com/ubuntu/dists/raring/{main,multiverse,restricted,universe}/binary-amd64/Packages.bz2"
>
> I've looked into those files and apparently they can be my solution but one
> question popped out:
>
> the files contain only the last version for each package, aren't they?
> I'll make myself clearer. Let's say that a package has more than one update
> in the repository precise-updates or precise-security, for example
>
> pkg-name_version_revision1.0
> and
> pkg-name_version_revision1.2
>
> In this case I won't be able to fetch the repo info for
> pkg-name_version_revision1.0 right? Or maybe I'm missing something

There'll be in different files. For example for vim in 12.10:

apt-cache policy vim
...
     2:7.3.547-4ubuntu1.1 0
        500 http://uk.archive.ubuntu.com/ubuntu/ quantal-updates/main
amd64 Packages
     2:7.3.547-4ubuntu1 0
        500 http://uk.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

So you'd have to look at both the quantal and quantal-updates files:

quantal file >>>>
Package: vim
Priority: optional
Section: editors
Installed-Size: 2016
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Debian Vim Maintainers
<pkg-vim-maintainers at lists.alioth.debian.org>
Architecture: amd64
Version: 2:7.3.547-4ubuntu1
...

quantal-updates file >>>>
Package: vim
Priority: optional
Section: editors
Installed-Size: 2016
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Debian Vim Maintainers
<pkg-vim-maintainers at lists.alioth.debian.org>
Architecture: amd64
Version: 2:7.3.547-4ubuntu1.1
...

I'd never thought of this before but since the above looked like a
control file, I checked vim and fluxbox.

The entries are similar except that the "Section" field is different
for a package in universe. fluxbox has "universe/x11" in the "Section"
field of the "*Package" file and "x11" the "Section" field of the
control file.

>From uk.archive.ubuntu.com_ubuntu_dists_quantal_universe_binary-amd64_Packages

Package: fluxbox
Priority: optional
Section: universe/x11
Installed-Size: 3947
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Dmitry E. Oboukhov <unera at debian.org>
Architecture: amd64
Version: 1.3.2-4
Provides: x-window-manager
Depends: menu (>= 2.1.19), libc6 (>= 2.15), libfontconfig1 (>= 2.8.0),
libfribidi0 (>= 0.19.2), libgcc1 (>= 1:4.1.1), libimlib2, libstdc++6
(>= 4.6), libx11-6, libxext6, libxft2 (>> 2.1.1), libxinerama1,
libxpm4, libxrandr2, libxrender1
Recommends: xfonts-terminus, feh | eterm | hsetroot | xloadimage
Suggests: fbpager, fbdesk, fbautostart
Filename: pool/universe/f/fluxbox/fluxbox_1.3.2-4_amd64.deb
Size: 1113370
MD5sum: 03fd24b83686fc348ec1089d294ded2e
SHA1: bf75f793c238580aeed91fd0ab4371acbcdddc6e
SHA256: 45132d14e13728ae6e0578a2e38160b6471ab1cdb4b716b48f564bd83809c0cf
Description: Highly configurable and low resource X11 Window manager
Homepage: http://fluxbox.org
Description-md5: 13990cdf4dc1b2dc117250b7023f2e58
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

>From the control file in the .deb:

Package: fluxbox
Version: 1.3.2-4
Architecture: amd64
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Original-Maintainer: Dmitry E. Oboukhov <unera at debian.org>
Installed-Size: 3947
Depends: menu (>= 2.1.19), libc6 (>= 2.15), libfontconfig1 (>= 2.8.0),
libfribidi0 (>= 0.19.2), libgcc1 (>= 1:4.1.1), libimlib2, libstdc++6
(>= 4.6), libx11-6, libxext6, libxft2 (>> 2.1.1), libxinerama1,
libxpm4, libxrandr2, libxrender1
Recommends: xfonts-terminus, feh | eterm | hsetroot | xloadimage
Suggests: fbpager, fbdesk, fbautostart
Provides: x-window-manager
Section: x11
Priority: optional
Homepage: http://fluxbox.org
Description: Highly configurable and low resource X11 Window manager
 Fairly similar to blackbox, from which it is derived, but has been
 extended with features such as pwm-style window tabs, configurable
 key bindings, toolbar, and an iconbar. It also includes some cosmetic
 fixes over blackbox.
 .
 This package contains support for GNOME and KDE.




More information about the ubuntu-users mailing list