Bug#385178: Bad dependencies managment that produce wrong lintian errors
Package: lintian
Version: 1.23.23
Severity: normal
Tags: patch
Hi,
I just see that my package (tailor) trigger a lintian error:
vdanjean@cayuga:~/debian/mainteneur/tailor$ lintian -i tailor_0.9.26-1_all.deb
E: tailor: python-script-but-no-python-dep ./usr/bin/tailor
N:
N: Packages with scripts that are executed with python must depend on the
N: package python. Those that have scripts executed with a versioned
N: python package need a dependency on the equivalent version of python.
N:
N: For example, if a script in the package uses #!/usr/bin/python, then
N: the package needs a dependency on "python". If a script uses
N: #!/usr/bin/python2.2, then the package need a dependency on
N: "python2.2".
N:
N: In some cases a weaker relationship, such as Suggests or Recommends,
N: will be more appropriate.
N:
However:
vdanjean@cayuga:~/debian/mainteneur/tailor$ dpkg --info tailor_0.9.26-1_all.deb
[...]
Depends: python2.4, python (>= 2.4) | python2.4, python-support (>= 0.2)
Recommends: rsync
Suggests: cvs, subversion, darcs, mercurial, monotone, codeville, bzr, bazaar, cogito, tla
Conflicts: bzr (<< 0.7), mercurial (<< 0.9.1)
[...]
Looking at lintian internal, I see that it badly builds $deps{all}
(near line 226 in checks/scripts) due to newlines. The following patch
fixes it:
--- scripts.orig 2006-08-29 12:33:41.000000000 +0200
+++ scripts 2006-08-29 12:32:19.000000000 +0200
@@ -224,6 +224,7 @@
}
$all_deps .= ', ' if $all_deps;
$all_deps .= $pkg;
+$all_deps =~ s/\n/, /g;
$deps{all} = Dep::parse($all_deps);
open(SCRIPTS, "scripts") or fail("cannot open lintian scripts file: $!");
Best regards,
Vincent
PS: this can be related to #380286 (some keywords are the same but I do
not really check)
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Versions of packages lintian depends on:
ii binutils 2.17-2 The GNU assembler, linker and bina
ii diffstat 1.43-1 produces graph of changes introduc
ii dpkg-dev 1.13.22 package building tools for Debian
ii file 4.17-3 Determines file type using "magic"
ii gettext 0.15-1 GNU Internationalization utilities
ii intltool-debian 0.35.0+20060710 Help i18n of RFC822 compliant conf
ii libparse-debianchangelog 1.0-1 parse Debian changelogs and output
ii man-db 2.4.3-3 The on-line manual pager
ii perl [libdigest-md5-perl 5.8.8-6.1 Larry Wall's Practical Extraction
lintian recommends no packages.
-- no debconf information
Reply to: