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

Bug#2060: dpkg and depends on version again



Package: dpkg
Version: 1.0.8

I have three test packages foo (1.0-0), foo (1.0-1) and bar (1.0-0).

Table 1: current interpretation by dpkg
Package Version Depends      Depends (in words)
foo     1.0-0   bar (>1.0-0) bar with version higher than 1.0-0
foo     1.0-1   bar (>1.0-1) bar with version higher than 1.0-1
bar     1.0-0   -

If this bar (1.0-0) is installed no version of these foo packages can
be installed because they both require higher version of bar than
provided. In practice foo (1.0-0) can be installed, foo (1.0-1)
can't. The ">" character is misleading and in practice it is
interpretated by dpkg as ">=". I would suggest to change the syntax
used in Depends/Conflict/Provides/Recommends/Suggest fields into a
more intuitive way (Table 2).

Table 2: suggested interpretation by dpkg
Package Version Depends       Depends (in words)
foo     1.0-0   bar (>=1.0-0) bar with version higher than or equal to 1.0-0
foo     1.0-1   bar (>1.0-1)  bar with version higher than or equal to 1.0-1
bar     1.0-0   -                                          ~~~~~~~~~~~

However, changing this now will break almost every Debian
installation. A way to prevent is is to prevent building new packages
with Depends/Conflict/etc fields with "<" or ">" in it, and notify the
maintainer to change this to "<=" or ">=". Installation rules should
remain the same until no more packages have "<" or ">" in it. For
consistency a "=" character should be allowed to indicate that the
mentioned version is requested.

Erick

Transcript example below:

# dpkg --info bar-1.0-0.deb
 old debian package, version 0.939000.
 size 424 bytes: control archive= 242, main archive= 169.
     140 bytes,     6 lines      control
 Package: bar
 Version: 1.0
 Package_Revision: 0
 Maintainer: Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
 Description: bar test package

# dpkg --info foo-1.0-0.deb
 old debian package, version 0.939000.
 size 443 bytes: control archive= 260, main archive= 170.
     162 bytes,     7 lines      control
 Package: foo
 Version: 1.0
 Package_Revision: 0
 Maintainer: Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
 Description: foo test package
 Depends: bar (>1.0-0)

# dpkg --info foo-1.0-1.deb
 old debian package, version 0.939000.
 size 443 bytes: control archive= 261, main archive= 169.
     162 bytes,     7 lines      control
 Package: foo
 Version: 1.0
 Package_Revision: 1
 Maintainer: Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
 Description: foo test package
 Depends: bar (>1.0-1)

# dpkg -i bar-1.0-0.deb
Selecting previously deselected package bar.
(Reading database ... 22075 files and directories currently installed.)
Unpacking bar (from bar-1.0-0.deb) ...
Setting up bar ...
# dpkg -i foo-1.0-0.deb
Selecting previously deselected package foo.
(Reading database ... 22076 files and directories currently installed.)
Unpacking foo (from foo-1.0-0.deb) ...
Setting up foo ...
# dpkg -i foo-1.0-1.deb
(Reading database ... 22077 files and directories currently installed.)
Preparing to replace foo (using foo-1.0-1.deb) ...
Unpacking replacement foo ...
dpkg: dependency problems prevent configuration of foo:
 foo depends on bar (>1.0-1); however:
  Version of bar on system is 1.0-0.
dpkg: error processing foo (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 foo


--
Erick Branderhorst@heel.fgg.eur.nl +31-10-4635142
Department of General Surgery (Intensive Care) University Hospital Rotterdam NL


Reply to: