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

Bug#128868: marked as done (debian-policy: Depends semantics unclear re circular depends)



Your message dated Wed, 26 Apr 2006 09:52:43 -0500
with message-id <877j5cbd8k.fsf@glaurung.internal.golden-gryphon.com>
and subject line This has been clarified in the latest upload
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: debian-policy
Version: 3.5.6.0
Severity: wishlist

 From section 7.2 `Binary Dependencies' of debian-policy:

#    `Depends'
#         This declares an absolute dependency.  A package will not be
#         configured unless all of the packages listed in its `Depends'
#         field have been correctly configured.

Suppose that package A Depends on B, and package B Depends on A.

My reading of the above policy excerpt is that is that circular
dependencies are not allowed, since it would be impossible to configure
either A or B without first configuring the other.[*1]

Whereas, in fact, a number of dependency cycles do occur in Debian; a
quick-and-dirty script (appended to this message) lists 65 cycles, of
which I've manually verified 4 (cpp <> cpp-2.95; perl <> perl-modules;
python <> python2.1; kdelibs3 <> kdelibs3-bin).

Given that the most natural reading of current policy forbids this
practice that occurs within some fairly high-profile packages, the
current wording of policy should be reworded: either it should make clear
that packages may be configured before their dependencies are configured,
or else explicitly state that dependency cycles are not allowed.

pjm.


[*1]: A notational shortcut is used in the A <-> B example, in that with
`x Depends: y', x is a "package instance", whereas y is a package
specification that can potentially be met by any of several package
instances, e.g.  different version numbers.  Where the above says "A
Depends on B" above, assume that B is the only package instance that
meets A's actual dependency specification.  This is the usual case when
installing for the first time.


Quick-and-dirty cycle-finding script (results require manual
verification, see the above comments):

Shell part:

  cat /var/lib/apt/lists/*_dists_unstable_main_*Packages |
   egrep '^(Package|(Pre-)?Depends):' |
   sed 's,([^)]*),,g' |
   tr -s ',| ' ' ' |
   perl to-tsort-in.pl |
   tsort 2>&1 > /dev/null |
   grep -v '^tsort: input contains a loop:$' |
   sed 's,^tsort: ,,' > cycles

Perl part (to-tsort-in.pl):

#! /usr/bin/perl -w
use strict;
my $pkg;
while(<>) {
    chomp;
    if(s/^Package: //) {
	$pkg = $_;
	next;
    }
    if(s/^(?:Pre-)?Depends: //) {
	my @deps = split(' ', $_);
	for my $i (@deps) {
	    print "$pkg $i\n";
	}
	next;
    }
    die("unrecognized line");
}



--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 25 Apr 2006 23:56:16 -0500
Source: debian-policy
Binary: debian-policy
Architecture: source all
Version: 3.7.0.0
Distribution: unstable
Urgency: low
Maintainer: Debian Policy List <debian-policy@lists.debian.org>
Changed-By: Manoj Srivastava <srivasta@debian.org>
Description: 
 debian-policy - Debian Policy Manual and related documents
Closes: 32263 117916 148194 190753 199849 212434 230217 341232 342611 344158 346598 349010 349775 355263 357613 359817 361137 362247 362975
Changes: 
 debian-policy (3.7.0.0) unstable; urgency=low
 .
   * Bug fix: "[PENDING AMENDMENT 20/01/2000] Splitting cgi-bin", thanks to
     Brian White.                                             (Closes: #32263).
   * Bug fix: "debian-policy: [PROPOSAL] Should update to Filesystem
     Hierarchy Standard FHS 2.3", thanks to Tobias Burnus
                                           (Closes: #230217, #212434, #344158).
   * Bug fix: "[AMENDMENT 11/04/2006] Permit multi-line fields in
     debian/control", thanks to John R. Daily. Mention that all fields,
     except the Uploaders, are supposed to be a single logical line, which
     may be spread over multiple physical lines (newline followed by space
     is elided). Also mention that anything parsing the control file must
     allow for a multi-line uploaders field.                (Closes: #148194).
   * Bug fix: "[AMENDMENT 12/04/2004] frown on programs in PATH with
     language extentions", thanks to Joey Hess.             (Closes: #190753).
   * Bug fix: "init script stop example should use --oknodo", thanks to
     Matt Kraai. Removed the example entirely.              (Closes: #346598).
   * Bug fix: "policy 12.5: Please recommend a sane practice WRT different
     gpl versions (was: Re: RFC/RFS: beef - a flexible BrainFuck
     interpreter)", thanks to Justin Pryzby. The subject leaves something
     to be desired, but polic should not attempt to enumerate all common
     licenses.                                               (Closes: #355263).
   * Bug fix: "debian-policy: Conflicting Architecture definitions", thanks
     to Hans Ulrich Niedermann. Punt to dpkg-architecture to providing
     legal architecture strings, since that's what is used by everyone
     anyway.  The version in policy was wrong, but that s=does not seem to
     have hindered anyone, which indicates that this policy directive was
     uneeded. Now the dpkg-architecture list is deemed authoritative, which
     it is, but the format for the string is defined by policy, and the
     current list of architecture strings is in an informative foot note.
                                                            (Closes: #357613).
   * Bug fix: "[AMENDMENT 06/04/2006] Make use of invoke-rc.d, if
     available, mandatory", thanks to Lars Wirzenius.        (Closes: #361137).
   * Bug fix: "no longer current regarding X font paths", thanks to Joey
     Hess                                                    (Closes: #362247).
   * Bug fix: "debian-policy: please prohibit circular dependencies, or
     mention that dependencies won't be respected during prerm remove",
     thanks to Justin Pryzby. Well, we did not prohibit circular
     dependencies. But we do now have a warning that In case of circular
     dependencies, since installation or removal order honoring the
     dependency order can't be established, dependency loops are broken at
     some random point, and some packages may not be able to rely on their
     dependencies being present when being installed or removed, depending
     on which side of the break of the circular dependcy loop they happen
     to be on.                                                (Closes: #362975).
   * Bug fix: "8.6.4. Providing a `shlibs' file: s/should create/must
     provide/", thanks to Christoph Berg. Clarified the wording.
                                                              (Closes: #341232).
   * Bug fix: "debian-policy: Chapter 6 - Package maintainer scripts:
     redundant info about exit status", thanks to Daniel Bonniot
                                                              (Closes: #349010).
   * Bug fix: "debian-policy: Refers to upgrading-checklist.txt instead of
     upgrading-checklist.txt.gz", thanks to Matt Kraai         (Closes: #349775).
   * Bug fix: "debian-policy: dpkg-gencontrol now uses -isp by default",
     thanks to Guillem Jover                                   (Closes: #359817).
   * Bug fix: "[PROPOSAL] unclear recommendation for debconf w/
     dpkg-statoverride", thanks to Eduard Bloch                (Closes: #199849).
   * debian-policy: please support Watch file as recommendation, thanks to
      Bluefuture                                               (Closes: #342611).
   * Bug fix: "[PROPOSED] Mandate http servers to provide httpd-cgi as
     relevenat", thanks to Uwe Hermann. This is already supported by the
     http servers out there.                                   (Closes: #117916).
Files: 
 a99c53850f2296afd22844be148c71c9 820 doc optional debian-policy_3.7.0.0.dsc
 e43f135a8c5ad3f7090435137bf14bb1 771599 doc optional debian-policy_3.7.0.0.tar.gz
 eede58ceff0218bca767236ca6f214b2 1510902 doc optional debian-policy_3.7.0.0_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFETwUjIbrau78kQkwRAhJoAJ4hJn1LsLLZz+QlEseg/kYOGKutiwCcDOGE
hDMF+HerbJZffUcCsHwBME4=
=+ydU
-----END PGP SIGNATURE-----

-- 
"Gort, klaatu nikto barada." The Day the Earth Stood Still
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

--- End Message ---

Reply to: