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

Re: Fix error message from tools/sort_deps



I see now, I think it should be:

--- 
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.
---
 tools/sort_deps |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/sort_deps b/tools/sort_deps
index e40073c..1946c43 100755
--- a/tools/sort_deps
+++ b/tools/sort_deps
@@ -308,7 +309,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 +318,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++;
-- 
1.6.3.3


-- 
Ian Campbell

It's hard to be humble when you're perfect.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: