You almost certainly don't need to read this.
I'm posting this here for the record in case someone
wants to check TDE for circular dependencies in future.
Bugs have been filed for all circular dependencies
found in a standard --with-recommendations TDE R14 RC1
Wheezy install.
(1) Why check for circular dependencies
Although apt and dpkg do their best to handle any circular
dependencies they encounter, circular dependencies can cause
problems and a generally discouraged.
(2) How to get rid of circular dependencies
Usually one finds the least important dependency in the circle
and changes it to a recommendation.
If you're dealing with a maze rather than a circle you may
to have convert several dependencies.
(3) tsort non-method
I first thought of using tsort on the dependencies listed
in Packages.gz. However versioned dependencies, provides,
conflicts, etc make this impractical.
(4) Recommended elegant automatic method
foreach PACKAGE in TRINITY {
start with a minimal (non-TDE) base system
install PACKAGE and all its dependencies
remove just PACKAGE
}
There should be no errors installing or removing.
However this method is somewhat time consuming even if
you arrange it to use snapshots in a chroot so you can
quickly revert to your minimal base system.
(5) Grungy manual method
Due to time constraints I used the following method for
TDE R14 RC1.
start with a non-TDE base system
let TARGET be a list of all installed packages
apt-get --install-recommends install desktop-base-trinity kde-trinity
while (true) {
let CURRENT be a list of all installed packages
let REMOVE be TARGET (join -v) CURRENT
let BUSY = false
do {
foreach PACKAGE in REMOVE {
Try to remove PACKAGE, if successful set BUSY = true
}
while (BUSY);
break if only TARGET packages are installed
manually figure out why no remaining package is removable
note and remove any set of co-dependent packages
}
This is overall a lot faster than the automatic method but
it requires more manual work. The first time the removals
stalled there were 76 packages still awaiting removal and
you then have to look through these to find the loops.
(6) Loops found in Wheezy TDE R14 RC1
(a) Bug #2194
kcontrol-trinity
konqueror-nsplugins-trinity
konqueror-trinity
konsole-trinitytdebase-trinity
ksmserver-trinity
tdebase-runtime-data-common-trinity
(b) Bug #2197
libkcal2b-trinity
libtdepim1a-trinity
(c) Pre-existing Debian Bug #626319
gnuift
gnuift-perl