Bug#165036: Circular dependency, unable to determine postinst order
Package: openoffice.org
Version: 1.0.1-5+woody
The openoffice.org package is dependent on openoffice.org-l10n-en |
openoffice.org-l10n, and vice versa. A circular dependency like this is a bug
and can lead to errors in certain circumstances.
Here is an excerpt from an installation which went wrong:
-------
dpkg: dependency problems prevent configuration of openoffice.org-l10n-en:
openoffice.org-l10n-en depends on openoffice.org (>= 1.0.0-pre1.0.1rc1);
however:
Package openoffice.org is not configured yet.
dpkg: error processing openoffice.org-l10n-en (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-l10n-nb:
openoffice.org-l10n-nb depends on openoffice.org (>= 1.0.0-pre1.0.1rc1);
however:
Package openoffice.org is not configured yet.
dpkg: error processing openoffice.org-l10n-nb (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openoffice.org-l10n-en
openoffice.org-l10n-nb
E: Sub-process /usr/bin/dpkg returned an error code (1)
error: ./45skolelinux-inst: unable to install 'task-skolelinux-common
task-skolelinux-server task-skolelinux-ltsp'.
-------
This is a part of an installation log from a Linux distribution which installs
a full set of packages in one go. Sometimes it works, sometimes it doesn't,
depending on the package list that was used. Even if installation in most
cases goes well, this example shows that dpkg can choose the "wrong" order.
Actually, I don't think dpkg *can* determine the correct order, we're just
lucky when it works out ;-)
"Depends" means that postinst for every package you depend on is guaranteed to
have run before the package's own postinst is run. Which of course is
impossible when there is a circular dependency.
I spoke to someone who knows the ins and outs of Debian packages better than I
do, who suggested using "Recommends" in the language packs or including the
English language pack in the openoffice.org package itself.
The first option is perhaps the best (and certainly the easiest), even if it
allows a language pack to be installed without installing the application
itself. The second option would in a way be consistent with gettext based
programs, where the English text always is available.
The lack of ability to distinguish between runtime dependencies and
configure-time dependencies seems to be a general Debian problem (look at
bug#128868), but a circular dependency is always best avoided.
Regards,
Gaute Hvoslef Kvalnes
Reply to: