From c967349160c25fa5171cf8bf1e6c12ce953030b4 Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Sun, 9 Aug 2009 14:50:38 +0000 Subject: [PATCH] Recognise and ignore Enhances: lines Patch from Ian Campbell. It seems that "apt-cache depends" recently (as of 0.7.22) started including Enhances lines in its output. Leading to: Generating dependency tree with apt-cache depends... UNEXPECTED: Line ` Enhances: kvm ' while parsing end of deptree from 'kvm-source' [etc....] Ignore these lines. --- debian/changelog | 1 + tools/sort_deps | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4abc7d88..969c1f9d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ debian-cd (3.1.3) UNRELEASED; urgency=low * Add support for "variants". A variant allows to include/exclude additional packages or D-I components relative to a regular image. * Add variant to create i386/amd64 images that support installing Xen guests. + * Recognise and ignore Enhances: lines. -- Frans Pop Tue, 04 Aug 2009 22:32:08 +0200 diff --git a/tools/sort_deps b/tools/sort_deps index e40073ca..1996f99b 100755 --- a/tools/sort_deps +++ b/tools/sort_deps @@ -308,7 +308,7 @@ sub read_depends { my $i = shift; # Ref my $lines = shift; # Ref my $pkg = shift; # string - my $types = "(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks"; + my $types = "(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks|Enhances"; my (@dep, @rec, @sug); my ($type, $or, $elt); @@ -317,7 +317,8 @@ sub read_depends { # Get rid of replaces and conflicts ... if (($type eq "Replaces") or ($type eq "Conflicts") or - ($type eq "Breaks")) { + ($type eq "Breaks") or + ($type eq "Enhances")) { $$i++; while ($lines->[$$i] =~ m/^\s{4}/) { $$i++;